Posted: Wed Jan 21, 2009 12:25 pm Post subject: Copy records between two alphanumeric values ?
Hi,
Our input files are like this.......
Input-1: (RECFM=FB, LRECL=90)
Code:
----+----1----+
9TJX10IR VOLUME
9TJX1013IMP 2008
9TJX10MOTOR, INC.
1GJX05IR VOLUME
1GJX0513IMP 2009
1GJX05TEEAY, INC.
2GJX09IR VOLUME
2GJX0913IMP 2007
2GJX09TEEAY, INC.
0GJX12IR VOLUME
0GJX1213IMP 2009
0GJX12TEEAY, INC.
0SJX00IR VOLUME
0SJX0013IRS 2008
0SJX00VETER, INC.
Input-2: (RECFM=FB, LRECL=80)
Code:
X00 X10
Need to copy records from file input-1 if 4th to 6th position of input-1 is in the range of values given in input-2. Range starting value is X00 and range ending value is X10 (both inclusive).
Expected output:
Code:
0SJX00IR VOLUME
0SJX0013IRS 2008
0SJX00VETER, INC.
1GJX05IR VOLUME
1GJX0513IMP 2009
1GJX05TEEAY, INC.
2GJX09IR VOLUME
2GJX0913IMP 2009
2GJX09TEEAY, INC.
9TJX10IR VOLUME
9TJX1013IMP 2008
9TJX10MOTOR, INC.
Please help.
Thanks. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Jan 21, 2009 1:06 pm Post subject:
mf_user,
You can use DFSORT symbols to get the desired results. You say copy but you actually are sorting the data. Change the sort card in step0200 to your desired sorting condition.
Kolusu, Thanks a lot. Yes. I wanted to have a SORTED output file. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
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