SORT code:
//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=XXXX.YYYY,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,26,SEQNUM,10,ZD,START=0)
OUTFIL FNAMES=OUT,NULLOFL=RC4,
INCLUDE=(1,4,CH,EQ,C'1TRL',AND,(11,10,ZD,EQ,27,10,ZD))
/*
· The above job will compare the record count specified in the trailer and the actual record count in the file.
· After comparison it provides the result in the spool like following if the counts are matching:
· If the counts are not matching job will throw RC=0004
Output which can be seen in spool:
1TRL0409010000000140 0000000140
//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=XXXX.YYYY,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,26,SEQNUM,10,ZD,START=0)
OUTFIL FNAMES=OUT,NULLOFL=RC4,
INCLUDE=(1,4,CH,EQ,C'1TRL',AND,(11,10,ZD,EQ,27,10,ZD))
/*
· The above job will compare the record count specified in the trailer and the actual record count in the file.
· After comparison it provides the result in the spool like following if the counts are matching:
· If the counts are not matching job will throw RC=0004
Output which can be seen in spool:
1TRL0409010000000140 0000000140
No comments:
Post a Comment