My SORT job is as shown below:
//STEP0001 EXEC PGM=SORT
//SORTIN DD *
555555555EEEEEEEEEE
111111111AAAAAAAAAA
333333333CCCCCCCCCC
222222222BBBBBBBBBB
444444444DDDDDDDDDD
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,2,ZD,A)
INREC OVERLAY=(5,2,C'CB')
OUTREC BUILD=(1,5,10,2,20:X)
/*
//SORTIN DD *
555555555EEEEEEEEEE
111111111AAAAAAAAAA
333333333CCCCCCCCCC
222222222BBBBBBBBBB
444444444DDDDDDDDDD
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,2,ZD,A)
INREC OVERLAY=(5,2,C'CB')
OUTREC BUILD=(1,5,10,2,20:X)
/*
Output:
11CB1AA
22CB2BB
33CB3CC
44CB4DD
55CB5EE
22CB2BB
33CB3CC
44CB4DD
55CB5EE
I would like to know if the same can be achieve by either using INREC or OUTREC alone.
Thanks.