Page 1 of 1

Trailer1 and no detail records

PostPosted: Wed Jul 24, 2019 10:39 pm
by johnwp53
Hi,
Is it possible to bypass the writing of a Trailer1 record when no detail records are written to the output file?
Trying to avoid creating a file with only a trailer record.
Thanks

Re: Trailer1 and no detail records

PostPosted: Wed Jul 24, 2019 11:16 pm
by sergeyken
The only visible way is:
1) use parameter NULLOFL=RC4 to detect no data records, and
2) add next JCL step to erase previous output with empty dataset (using PGM=IEBGENER, or whatever, to write over the previous output dataset from SORT step)