View previous topic :: View next topic
|
Author |
Message |
guruji Warnings : 1 New User
Joined: 13 Apr 2007 Posts: 59 Location: Chennai
|
|
|
|
Hi all,
I have a file with data given as below:
Code: |
ABCD 1123 1234 123456 1123 ABC1 CDEF
1124 1235 123457 1124 FGTH GHT7
1342 1456 145767 1456 RTGY NJU6
ABCE 1122 1235 123457 1123 ABCS CDEB
1122 1237 123454 1120 FGTJ GHT2
1341 1455 145747 1459 RTGS NJU2 |
I want to append all the consecutive records corresponding to the first field 'ABCD' into one single record, and similarly for 'ABCE', and writing the output file having an increased record length. The out put file will somewhat look like:
Code: |
ABCD 1123 1234 123456 1123 ABC1 CDEF 1124 1235 123457 1124 FGTH GHT7 1342 1456 145767 1456 RTGY NJU6
ABCE 1122 1235 123457 1123 ABCS CDEB 1122 1237 123454 1120 FGTJ GHT2 1341 1455 145747 1459 RTGS NJU2 |
|
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
guruji,
How many records can you have per key? You show 3 lines for each key, is that the max? or can you have more than that?
What is the LRECL and RECFM of the input file? What is the position and format of the key 'abcd'? |
|
Back to top |
|
|
|