GeekInterview.com
Series: Subject:
Question: 71 of 105

Sort Duplicates in Dataset

How do I use SORT to copy duplicates in a Dataset to another
Asked by: Mainframeguy | Member Since Mar-2008 | Asked on: Mar 26th, 2008

View all questions by Mainframeguy   View all answers by Mainframeguy

Showing Answers 1 - 3 of 3 Answers

Use XSUM parameter in Sort

Syntax for XSUM - SUM FIELDS=NONE,XSUM in the Sort card, and a DDNAME SORTXSUM to define the file for XSUM.

  
Login to rate this answer.
Vijay1979

Answered On : Mar 9th, 2011

View all answers by Vijay1979

//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

  
Login to rate this answer.
siddup143

Answered On : Aug 6th, 2011

View all answers by siddup143

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. /*

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.