Page 1 of 1

Eliminate duplicate records

PostPosted: Mon Dec 24, 2007 1:56 pm
by madhavmannem
how to eliminate duplicate records ?

Re: Eliminate duplicate records

PostPosted: Mon Dec 24, 2007 9:57 pm
by Frank Yaeger
It depends on what you mean by "eliminate duplicate records". For example, if you want to keep the first record with each key in positions 11-15, 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(11,5,CH) FIRST
/*


If you want to do something else, you need to explain clearly what you want to do. Examples of input and expected output would help.

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/servers/storage/supp ... tmpub.html