//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//OUT DD DSN=... output file (FB/80)
//RPT DD DSN=... control file (FB/120)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'000')),
IFTHEN=(WHEN=(7,6,CH,EQ,C'HEADER'),
OVERLAY=(81:C'000')),
IFTHEN=(WHEN=(44,2,CH,EQ,C'72'),
OVERLAY=(44:C'63',81:C'1')),
IFTHEN=(WHEN=(44,2,CH,EQ,C'76'),
OVERLAY=(44:C'66',82:C'1')),
IFTHEN=(WHEN=NONE,
OVERLAY=(83:C'1'))
OUTFIL FNAMES=OUT,BUILD=(1,80)
OUTFIL FNAMES=RPT,REMOVECC,NODETAIL,
OVERLAY=(120:X),
TRAILER1=('PROGRAM-R01',41:'XYZ COMPANY',
94:'PAGE: ',PAGE=(M10,LENGTH=3),/,
'RUN DATE: ',DATE=(MDY/),40:'HARTFORD',83:'STANDARD REPORT',/,
'RUN TIME: ',TIME=(24:),30:'EDITED FILE TRANSACTION CONVERSION',
/,47:'CONTROL REPORT',/,X,/,
'1.0 TOTAL RECORDS READ: ',COUNT=(M10,LENGTH=8),/,
'2.0 TOTAL HEADER RECORDS READ: 1',/,
'3.0 TOTAL RECORDS 72 TRNS CODE CONVERTED TO 63: ',
TOT=(81,1,ZD,M10,LENGTH=8),/,
'4.0 TOTAL RECORDS 76 TRNS CODE CONVERTED TO 66: ',
TOT=(82,1,ZD,M10,LENGTH=8),/,
'5.0 TOTAL UNPROCESSED RECORDS: ',
TOT=(83,1,ZD,M10,LENGTH=8),/,X,/,X,/,
50:'*** END OF REPORT ***')
/*