REMOVING DUPLICATES FROM INPUT FILE AND WRITE DUPLICATES TO A FILE
//SREMDUPL JOB (XXXXXXXX,,,,,XXXX),’ ‘, // CLASS=J,MSGCLASS=Y,NOTIFY=&SYSUID, //* THIS JOB SORTS THE INPUT FILE AND REMOVES //* WRITES DISTINCT RECORDS IN SORTOUT //* WRITES DUPLICATE RECORDS IN SORTXSUM //STEP001 EXEC PGM=IEFBR14 //DD01 DD DSN=USERID.ABC.DISTINCT, // DISP=(MOD,DELETE,DELETE),UNIT=DISK //DD02 DD DSN=USERID.ABC.DUPLICAT, // DISP=(MOD,DELETE,DELETE),UNIT=DISK //SORTIN DD DISP=SHR,DSN=USERID.ABC.INPFILE //SORTOUT DD DSN=USERID.ABC.DISTINCT, // DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,SPACE=(CYL,(2,2)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0) //SORTXSUM DD DSN=USERID.ABC.DUPLICAT, // DISP=(NEW,CATLG,CATLG),UNIT=SYSDA,SPACE=(CYL,(2,2)), // DCB=(RECFM=FB,LRECL=100,BLKSIZE=0) //SORTWK01 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE) //SORTWK02 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE) //SORTWK03 DD UNIT=DISK,SPACE=(CYL,(20,5),RLSE)
to
//SYSIN DD * SORT FIELDS=(1,22,CH,A) SUM FIELDS=NONE,XSUM
/*
Now it will work fine 🙂
By,
Mohammed Hassan Ali L.(+91 9710638651)