Sort Duplicates in Dataset

How do I use SORT to copy duplicates in a Dataset to another

Questions by Mainframeguy   answers by Mainframeguy

Showing Answers 1 - 3 of 3 Answers

Vijay1979

  • Mar 9th, 2011
 

//DDName EXEC PGM=SORT
//SORTIN DD DSN=XXXXXXXXXXXXXXXXX,
// DISP=SHR
//SORTOUT DD DSN=XXXXXXXXXXXXXXXXXXXX,
// DISP=(NEW,CATLG,DELETE),
// UNIT=XXXXX,SPACE=(XXX,(XX,XX),XXXX),
// DCB=(*.SORTIN) Output file created using properties from input file.
//SORTXSUM DD DSN=&HILVL..EFS.HV01BG17.SORTED.DUP,
// DISP=(NEW,CATLG,DELETE),
// UNIT=XXXXX,SPACE=(XXX,(XX,XX),XXXX),
// DCB=(*.SORTIN) Output file created using properties from input file.
//SORTWK01 DD UNIT=XXXXX,SPACE=(XXX,(X,X))
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,7,CH,A)
SUM FIELDS=NONE,XSUM

Also you can refer the below link to know more details about sort :
http://itechp2pexchange.com/node/106

  Was this answer useful?  Yes

siddup143

  • Aug 6th, 2011
 

By using soft utility we can copy the duplicate regards of one file to another file.

Code
  1.   //SYSIN DD *

  2.       SORT FIELDS=COPY

  3.       SUM FIELDS=NONE,XSUM

  4.  //SORTXSUM DD DSN=OZA040.PC.DUP.FILE,DISP=OLD

  5. /*

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions