Page 1 of 1

To Find Duplicates using Sort ! !

PostPosted: Tue Dec 20, 2011 1:44 pm
by gauthamnagpur18
Hi ,

I have a file of length 21 . My requirement is to find the duplicates . I tried to do this, but its showing only one entry for 10 duplicate entries (for particular record ) . Is there any way to show all duplicate entries .

Please help me out .

Thanks,
Gautham

Re: To Find Duplicates using Sort ! !

PostPosted: Tue Dec 20, 2011 11:01 pm
by Frank Yaeger
Gautham,

If you want to show all of the duplicates, you can use a DFSORT/ICETOOL job like the following:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file
//OUT DD DSN=...  output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,21,CH) ALLDUPS
/*


If that doesn't give you what you want, then you need to do a better job of explaining what you do want with examples of input and expected output.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080