I have a file with header detail and trailer records. I want to filter the number detail records using a condition ( such as details records with a filed value 'a') . Then the output file should have the same header ,filtered details and trailer record and also want to update the count of the detail records in the trailer record.( ie there is filed in trailer corresponding to number of details records wrote into output . I want to update that field also
Please show an example of the records in your input file and what you expect for the output records. Give the RECFM and LRECL of the input file.
Give the details of the condition for filtering the records.
Joined: 29 Jun 2006 Posts: 1439 Location: Bangalore,India
You should you given the layout also with examples. Anyways, the sort card which you are looking for is below -
//SYSIN DD *
INCLUDE COND=(7,3,CH,EQ,C'100') * assumption 100 starts @ col 7
OUTFIL HEADER1=(C'PERFOMANCE REPORT'), * Assumed this is a constant
TRAILER1=(C'CLASSXX ',COUNT) * Assumed 'xx' value is constant.