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 Posted / ruknamw@yahoo.com

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell us about the architecture of abinitio.

877


can we perform checkin and checkout through sandbox?

927


What is air-project parameter ?

1958


How to run a graph infinitely?

872


What do you understand by a cartesian join?

881


What is publickey and private key?what is the use of this two keys?

2610


Describe the evaluation of parameters order in ab initio?

1265


What is the importance of eme in abinitio?

888


What are differences between different versions of co-op?

915


What are the reasons for which business can trust the approach of data processing?

875


What is flow buffering ? How it reduces the chances of having deadlock ? How to use in abinitio graph?

3038


How can you SORT an already partitioned (round-robin) data ? How to use in abinitio graph? 3. How internally partition by key decides which key to send in which partition ? How to use in abinitio graph? 4. What is PDL ? Give him a shell type parameter and ask him to convert it to PDL. How to use in abinitio graph? 5. As shell type parameters are not supported by EME, then how you can use shell type parameter (If you don't want to use PDL) without hampering lineage diagram ? How to use in abinitio graph? 6.How you can generate dml from a COBOL copy book ? How to use in abinitio graph? 7. How you can convert from ebcdic to packed decimal ? How to use in abinitio graph?

4164


Have you worked with packages?

913


What is sandbox?

946


Have you used the rollup component? Describe how?

882