Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
senthilmurugan,
I have modified the code in the prevous topic to make it work for your requirement.
Code: |
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SORTIN DD *
2009/133
2009/145
2009/132
2009/161
2009/161
2009/161
//SYSIN DD *
INREC IFTHEN=(WHEN=(1,2,CH,EQ,C'19'),
OVERLAY=(81:X'00',3,2,6,3,82:82,5,ZD,PD,LENGTH=3)),
IFTHEN=(WHEN=(1,2,CH,EQ,C'20'),
OVERLAY=(81:X'01',3,2,6,3,82:82,5,ZD,PD,LENGTH=3)),
IFTHEN=(WHEN=(1,2,CH,EQ,C'21'),
OVERLAY=(81:X'02',3,2,6,3,82:82,5,ZD,PD,LENGTH=3))
SORT FIELDS=COPY
OUTREC FIELDS=(81,4,DT1)
OUTFIL BUILD=(5,2,C'/',7,2,C'/',3,2) |
SORTOUT
Code: |
05/13/09
05/25/09
05/12/09
06/10/09
06/10/09
06/10/09 |
EDITED: Corrected a typo |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
When you have a new question, it is best to start a new topic and then refer to the old link in your post.
Where in these statements are you stuck?
There is no good reason for people here to reword the documentation, but if you ask about more specific doubts, we should be able to help. |
|