To Whom It Concern:
My input data set is FB,LRECL=200 and contains a header, data & trailer records. There are times when the vender will transmit a file that contains an extra blank line after the trailer record causing the job to fail on a trailer count mismatch. I want to compare the records in the data set against the trailer record count. The below job works if the extra blank line is before the trailer. There are a total of 9 records in the below example including the blank line after the trailer record. Any thoughts on how I could change the below code to include the blank that is after the trailer record?
//S1 EXEC PGM=SORT,PARM='NULLOUT=RC4'
//SORTIN DD *
HEADER20110825233448
111111111111111111111111111111111111111111
222222222222222222222222222222222222222222
333333333333333333333333333333333333333333
444444444444444444444444444444444444444444
555555555555555555555555555555555555555555
666666666666666666666666666666666666666666
TRAILER20110825233449000000008
//SORTOUT DD DSN=&&TEMP,DISP=(NEW,PASS),SPACE=(CYL,(1,1),RLSE)
//SYSOUT DD SYSOUT=*
//SORTLIST DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,6,ZD))
OUTFIL INCLUDE=(1,7,CH,EQ,C'TRAILER',AND,25,6,ZD,EQ,81,6,ZD)
/*