//S001 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=XYZ
//SRT1OUT DD DSN=ABC1,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=FBA,LRECL=45,BLKSIZE=0)
//SRT1CNTL DD *
SORT FIELDS=COPY
INCLUDE COND=(1,3,CH,EQ,C'ID1 ') <<<<<<This condition
OUTFIL HEADER1=(1:'REPORT DT:',
12:&DATE=(MD4/),
45:'header title',/,
1:'REPORT ID: ',
12:'123456',/,
45:'XXXXXXXXXXX - ID1 ',2/, <<<<<<This heading
1:'~col 1',13:'~',
14:'col 2',25:'~',
26:'col 3',39:'~',
40:'col 4',54:'~'),
TRAILER1=('~RECORDS WRITTEN : ',COUNT=(M10,LENGTH=8),//,
1:'~--------------------------------------------',
46:'---------------------------------------------',
91:'-------------------'),
LINES=250
OUTREC FIELDS=(C'~',1,08,C'~',
09,08,C'~',
17,05,C'~',
22,80,C'~')
*
//S002 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=XYZ
//SRT2OUT DD DSN=ABC2,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=FBA,LRECL=45,BLKSIZE=0)
//SRT2CNTL DD *
SORT FIELDS=COPY
INCLUDE COND=(1,3,CH,EQ,C'ID2') <<<<<<This condition
OUTFIL HEADER1=(1:'REPORT DT:',
12:&DATE=(MD4/),
45:'header title',/,
1:'REPORT ID: ',
12:'123456',/,
45:'XXXXXXXXXXX - ID2 ',2/, <<<<<<This heading
1:'~col 1',13:'~',
14:'col 2',25:'~',
26:'col 3',39:'~',
40:'col 4',54:'~'),
TRAILER1=('~RECORDS WRITTEN : ',COUNT=(M10,LENGTH=8),//,
1:'~--------------------------------------------',
46:'---------------------------------------------',
91:'-------------------'),
LINES=250
OUTREC FIELDS=(C'~',1,08,C'~',
09,08,C'~',
17,05,C'~',
22,80,C'~')
//*