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

What parameter of the job statement is used to limit the cpu time consumed by the job?

838


Is automatic restart possible in jcl? If yes, how?

655


Mention the types of job control statements?

686


Explain about LMFREE�free data set from its association with data ID

1003


I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?

703






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

605


which utility is used a dummy utility?

791


What is NOTCAT ?

738


what is the difference between JES3 and JES2?

681


How to run cobol program using jcl?

649


What is the purpose of dd?

728


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

1969


In job processing, what happens in conversion stage?

739


Explain how can a jobs execution priority be modified?

740


how you can direct the data to spool using SYSOUT option?

925