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 do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?

1771


Can I send output of job to my remote device careerride123?

890


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

2257


which parameter is used to check the syntax of a jcl without executing it?

1050


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

8081


What are s0c1, s0c4, s0c5, s0c7 and socb?

935


Where & How Do You Code Identifier In Jcl?

944


How can unused space allocation be returned to the system when a dataset is closed?

1111


which parameter is use to declare the name of dataset in dd statement?

983


How does jcl specify the job to the operating system?

955


Is it possible to left uncode disp?

909


What are the parameter we cannot use in procedure?

821


how would you create a temporary dataset? And where will you use them?

999


Can I share my data with other jobs? How?

860


What methodology can be adapted to transfer data to a program that is coded using the exec statement?

879