ankur


{ City } bangalore
< Country > india
* Profession * tech lead
User No # 112764
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 4
Users Marked my Answers as Wrong # 4
Questions / { ankur }
Questions Answers Category Views Company eMail




Answers / { ankur }

Question { IBM, 17605 }

Can you read multiple input files using one input file component ?(same DML)


Answer

If all the input files are in the same layout, you can also leverage the custom layout option in the INPUT FILE component. You can add as many files as you want and the component will treat the files as a Multifile.

Is This Answer Correct ?    1 Yes 0 No

Question { 11840 }

How can you achieve scan using reformat ?


Answer

To create a simple sequence, the next_in_sequence() function can be used in a reformat.

In order to get cumulative summary, temporary variables can be used iteratively to increment a particular column by adding the previous value with the current value incrementally.

If a Key is involved, we need to ensure that the Key is sorted before the Reformat. A key change function using variables need to be written such that if the Key's current value is not equal to the previous value, the group has changed and the cumulative total needs to begin again with the current record value. If multiple columns make a key, the values can be concatenated for the key change verification.

Is This Answer Correct ?    2 Yes 0 No


Question { CTS, 23085 }

Hi friends,
I have 100 records in my input file, if i run first,the
first 10 records are stored into the output and if i run
second time next 10 records stored into the output file like
that

please let me know the answer

Thanks,
krishna


Answer

Approach 1: Least Number of components. (only 3)
-----------

1. Declare a Parameter $COUNT to get the count of the Output file
2. Use that parameter in a FILTER BY EXPRESSION component after the input file. Use the below filter.

((next_in_sequence() + 1)/ 2 ) > $COUNT
and (next_in_sequence()/2 ) < (11 + $COUNT)

NOTE: The complicated logic above is used because of two next_in_sequence() functions which would be incremented by 2 for each record.

Alternative approach is to use a scan and local variables to create the sequence manually and use the appropriate filter. OR use two FILTER BY EXPRESSIONS, with the below filters:
next_in_sequence() > $COUNT
next_in_sequence() < 11

Approach 2:
-----------
1. Join the Output and Input file on all keys (or primary key if applicable)
2. Use a Filer component after the Unused port for the Input file. Filter should be next_in_sequence() < 11

Is This Answer Correct ?    1 Yes 4 No