Awesome, Kolusu, thanks a lot!!! ----------------------------------- It is quite simple to verify the number of records and validate it against the trailer record and if the record count match the return code is 0 and if the count is off then the return code is set to 4.
I assumed that the trailer record is not counted as part of the record count. If it is indeed counted then simply remove the ",START=0" on the INREC statement. Use the following JCL //STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * A B C D RECS=00005 //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY INREC OVERLAY=(81:SEQNUM,5,ZD,START=0) OUTFIL NULLOFL=RC4, INCLUDE=(1,5,CH,EQ,C'RECS=',AND, (06,5,ZD,EQ,81,5,ZD)) //* The above job will end with RC=4 as there are only 4 records but the trailer says 5 records. Further if you have any questions please let me know Thanks, Kolusu DFSORT Development IBM Corporation ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN