splitting 950 lines to each Header and Line Items
Posted: Thu Apr 01, 2004 5:08 am
Hi,
i have requirement that i need to split 950 line items for each Header record according to business logic where source file contains millions of records.
eg:- suppose a transaction may contains 1000 line items and the logic should go as follows:-
H Z-101 K012
L 2345.56 4567.89 Y 2004 013 C0060
L 8909.89 3456.78 N 2004 012 C5549
.. ..... ..... .. ....... ... .......
.. ..... .... ... ....... ... .......
950th line Item
L 8999.99 6789.89 Y 2003 011 c6789
H z-101 k102
951 st to 1000 line items
L .... .... .. .... ... ....
.. ... .... .. ... ... ....
if the transaction exceeds 950 lines, then remaining line items should come after creating a header(see the above example).
Can anybody help me how to implement this logic in datastage mapping.
Source is flate file
Target is SQL Server Database.
Thanks
i have requirement that i need to split 950 line items for each Header record according to business logic where source file contains millions of records.
eg:- suppose a transaction may contains 1000 line items and the logic should go as follows:-
H Z-101 K012
L 2345.56 4567.89 Y 2004 013 C0060
L 8909.89 3456.78 N 2004 012 C5549
.. ..... ..... .. ....... ... .......
.. ..... .... ... ....... ... .......
950th line Item
L 8999.99 6789.89 Y 2003 011 c6789
H z-101 k102
951 st to 1000 line items
L .... .... .. .... ... ....
.. ... .... .. ... ... ....
if the transaction exceeds 950 lines, then remaining line items should come after creating a header(see the above example).
Can anybody help me how to implement this logic in datastage mapping.
Source is flate file
Target is SQL Server Database.
Thanks