I have multiple records for a given account id and trying to combine all records related to each
account into one single record. Number of records for each account may vary from 1 - 4. Can
someone please help to do this using syncsort?.
Input:
Fixed 19 record length file. No header & trailer record in the file.
3 - input fields with their record position
code Flag1 Flag2 Amount
(1-4) (5) (6) (7-13)
1210 2 1 000079751.79
1210 1 4 000440494.52
1210 2 4 -000241189.45
1213 2 1 000154520.73
1213 2 4 -000227258.71
(1-4) (5) (6) (7-13)
1210 2 1 000079751.79
1210 1 4 000440494.52
1210 2 4 -000241189.45
1213 2 1 000154520.73
1213 2 4 -000227258.71
Expected output:
6 - output fields
Code# Flag 1 Amount Amount Amount Amount
(1-4) (5-5) (6-18) (19-31) (32-44) (45-57)
1210 1 0 0 0 000440494.52
1210 2 0 000079751.79 0 -000241189.45
1213 2 0 000154520.73 0 -000227258.71
(1-4) (5-5) (6-18) (19-31) (32-44) (45-57)
1210 1 0 0 0 000440494.52
1210 2 0 000079751.79 0 -000241189.45
1213 2 0 000154520.73 0 -000227258.71
Any help will be greatly appreciated.
Thank you.