Makies,
Run the following job and after completion of the job check the contents of SUR0016.SURMSTR.SYSOUT dsn which contains the sysout messages and SUR0016.SURMSTR.SORTOUT dsn which contains the output from the sort step
//SUR0016A JOB CLASS=A,USER=SUR0016,
// MSGCLASS=H,
// MSGLEVEL=(1,1),
// NOTIFY=SUR0016
//*
//STEP0100 EXEC PGM=IEFBR14
//FILE01 DD DSN=SUR0016.SURMSTR.SYSOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(5,5),RLSE),
// DCB=(LRECL=121,RECFM=FBA,BLKSIZE=121)
//*
//FILE02 DD DSN=SUR0016.SURMSTR.SORTOUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(5,5),RLSE),
// DCB=SURMSTR.TRDATA2
//*
//STEP0200 EXEC PGM=SORT
//SYSOUT DD DSN=SUR0016.SURMSTR.SYSOUT,DISP=OLD
//SORTIN DD DSN=SURMSTR.TRDATA2,DISP=SHR
//SORTOUT DD DSN=SUR0016.SURMSTR.SORTOUT,DISP=OLD
//SYSIN DD *
SORT FIELDS=(24,2,ZD,A)
OPTION ZDPRINT
SUM FIELDS=(27,7,ZD)
/*
Hope this helps...
Cheers