Posted: Fri Aug 28, 2009 10:55 am Post subject: How to copy header & trailer records.
Hi,
My input data is as shown below:
Code:
JFK5 COMSTATE1004525XL5
JFK5 COMSTATE1004524XL5
12007NNNTJW1GYUCCEF AR 3009082712C000412007N6C10706 92392213 001
JFK5 COMSTATE1004506XL5
JFK5 COMSTATE1004505XL5
JFK5 COMSTATE1004503XL5
31027AMWZ1H1GYUKJEF AR 3009082512S000423812N6K10906 92391529 001
35100BNFSVR1GYUKEEJ AR 3009082512T000423081N6K10706 92391529 001
36002CNKC581GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
23029DNMV941GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
22285ENNBW31GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
36234FNNPS41GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
12007GNNTJW1GYUCCEF AR 3009082512T0004 N6C10706 92391529 001
22157HNPVVR1GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
JFK5 COMSTATE1004484XL5
JFK5 COMSTATE1004482XL5
46308IKKC9V1G4GE5EV AF 3009081811T0004 N 4GT6992391336 00G
46308JKKDBK1G4GE5EV AF 3009081811T0004 N 4GT6992391336 00G
34421KKNDFM1G4GD5EG AF 3009072111S0004 N 4GM6992391336 00G
I want to select only the header and trailer records which are continous as shown below:
Code:
JFK5 COMSTATE1004524XL5
12007NNNTJW1GYUCCEF AR 3009082712C000412007N6C10706 92392213 001
JFK5 COMSTATE1004503XL5
31027AMWZ1H1GYUKJEF AR 3009082512S000423812N6K10906 92391529 001
35100BNFSVR1GYUKEEJ AR 3009082512T000423081N6K10706 92391529 001
36002CNKC581GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
23029DNMV941GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
22285ENNBW31GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
36234FNNPS41GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
12007GNNTJW1GYUCCEF AR 3009082512T0004 N6C10706 92391529 001
22157HNPVVR1GYUKJEF AR 3009082512T0004 N6K10906 92391529 001
JFK5 COMSTATE1004482XL5
46308IKKC9V1G4GE5EV AF 3009081811T0004 N 4GT6992391336 00G
46308JKKDBK1G4GE5EV AF 3009081811T0004 N 4GT6992391336 00G
34421KKNDFM1G4GD5EG AF 3009072111S0004 N 4GM6992391336 00G
I don't want copy the only header records that don't have trailer records.
Please help.
Thanks. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Fri Aug 28, 2009 10:57 am Post subject:
ranga_subham,
How do you identify the header and trailer? what is the LRECL and recfm of the input and output file? _________________ Kolusu
www.linkedin.com/in/kolusu
1). It always starts with an alphabet like "J" at 1st column.
2). It always have XL5 appearing starting at 25th column.
3). It always have an alphabet at 10th column.
The LRECL is 80 and RECFM is FB.
Thanks. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
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