how to eliminate the duplicates in sorting

Answer Posted / muttaiah

use the Sort utility, In the instream data of the sort card
Specify.
//sysin dd *
sort fields=copy
sum fields=none,xsum
/*
for this you need to have a dd stmt as
//sortxsum dd dsn=datasetname, disp=(createnew, share)

Now, the output file will have the records without
duplicates & the duplicates will be captured in the above
dsn of the sortxsum dd.

Correct me if i'm wrong

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to left uncode disp?

706


How can a fb file convert to vb file using sort program?

800


Explain the jcl exec statement?

643


I need exexution process for JCL programs

1843


Brief description of inline procedure of jcl.

677






How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5058


Is their any set of rules for dd? Explain.

653


How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you

601


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2092


How would you understand error(execution phase)?

619


why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.

1938


What is NOTCAT ?

734


how to compare two datasets without using superce because output is limited to 133 bytes

1476


when does a dataset go uncataloged?

824


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9205