Trailer recod looks like this:
TRAILER 20090401 1304760
I am trying this using a SORT step s below:
//PS000010 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=myid.input,DISP=SHR
//OUT DD DSN=myid.AUD,
// DISP=(NEW,CATLG,DELETE),
// UNIT=(,30),
// SPACE=(TRK,(1,1)),
// DCB=(DSORG=PS,RECFM=FB,LRECL=38,BLKSIZE=38)
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,26,SEQNUM,12,ZD,START=0)
OUTFIL FNAMES=OUT,NULLOFL=RC4,
INCLUDE=(1,07,CH,EQ,C'TRAILER',AND,
(18,12,ZD,EQ,27,12,ZD))
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=myid.input,DISP=SHR
//OUT DD DSN=myid.AUD,
// DISP=(NEW,CATLG,DELETE),
// UNIT=(,30),
// SPACE=(TRK,(1,1)),
// DCB=(DSORG=PS,RECFM=FB,LRECL=38,BLKSIZE=38)
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,26,SEQNUM,12,ZD,START=0)
OUTFIL FNAMES=OUT,NULLOFL=RC4,
INCLUDE=(1,07,CH,EQ,C'TRAILER',AND,
(18,12,ZD,EQ,27,12,ZD))
I am getting MAXCC=0 but the output file is empty whcih is whay I am confused.
I also want to comapre the date in the trailer record with a DATE file.Can I accomplish this one step? Please help me with this?
input (myid.input) is the file which has a trailer record as the last record.
TRAILER 20090401 1304760 ----->the last figure is the record count.
I want to compare this record count with the actual no of data records in the file (myid.input) . This file also has a header record. The record count on the Trailer record is the count of the actual data records, it excludes the header and trlr record.
If the count matches, we should get some statistics as:
No of records in input file= 1304760
TRailer record count = 1304760.
But if the count deos not match, the job shound give a RC of 8.
Inthe input file , the record looks as given below....just data records.
U00000000345678906000+00000000+200902......................
The date file has just the date in it - '2009-04-01'. It just has to compare this date with the date in the trailer record. And give an RC of 8 if it does not match. If it matches just,
give stats as below:
Date in the trailer record= 20090401
Date in the Date file - 20090401
Thanks,
Shilpashilpakhaire