I use below JCL to find unique and duplicate records.......
//SYSIN DD *
SORT FIELDS=(1,4,CH,A)
SUM FIELDS=NONE,XSUM
//SORTOUT DD SYSOUT=* <-- UNIQUE RECORDS
//SORTXSUM DD SYSOUT=* <-- DUPLICATE RECORDS
//SYSOUT DD SYSOUT=*
SORT FIELDS=(1,4,CH,A)
SUM FIELDS=NONE,XSUM
//SORTOUT DD SYSOUT=* <-- UNIQUE RECORDS
//SORTXSUM DD SYSOUT=* <-- DUPLICATE RECORDS
//SYSOUT DD SYSOUT=*
I request you to help me the SORT card using Joinkeys feature to achieve the same.
Please help.
Thanks.