Posted: Mon Jun 28, 2010 1:11 pm Post subject: Help with merging two records
Hi ,
I need a one time job that can merge the data.here are the requirements
Key is 1 - 14 char
Acct 16-19
For each key we can have a max. of 2 accts (1657 & 1857)
I want to merge these two accounts for each key in 1 record.
Input
Code:
----+----1----+----2----+----3----+----4----
***************************** Top of Data **
01078,20,08,01,1657,T,01,00,+,0,542,499,
01078,20,08,02,1857,T,01,00,+,0,543,500,
01088,20,09,03,1657,T,03,00,+,0,506,500,
01088,20,09,03,1857,T,03,00,+,0,507,501,
Output:
Code:
----+----1----+----2----+----3----+----4----+----
***************************** Top of Data *******
01078,20,08,01,1657,542,499,1857,543,500
01088,20,09,03,1657,506,500,1857,507,501
I can do this using cobol.Since this is 1 time,I need help doing this using SORT.
huh? how did you end up with 2 records and 2 different values from a single record?
Also you mention that the key is 14 bytes but if you look at the first 2 records the key is different in bytes 13 and 14 . And how do you determine where to pad the spaces in terms of a single record. start over and show me all the possible variations inputs and desired results. _________________ Kolusu
www.linkedin.com/in/kolusu
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum