Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
rgupta71,
Assuming your input is FB recfm and LRECL of 80, the following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
HADER1
HEADER2
HEADER3
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFOUTLEN=80,IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(81,8,ZD,EQ,2),OVERLAY=(DATE1)),
IFTHEN=(WHEN=(81,8,ZD,EQ,3),OVERLAY=(TIME))
//* |
The output from this job is
Code: |
HADER1
20110315
12:19:40
HEADER2
HEADER3
|
|
|