Eliminate duplicate records

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...
madhavmannem
Posts: 6
Joined: Wed Dec 19, 2007 12:27 am
Skillset: cobol
Referer: friend

Eliminate duplicate records

Postby madhavmannem » Mon Dec 24, 2007 1:56 pm

how to eliminate duplicate records ?

User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Skillset: DFSORT, ICETOOL, ICEGENER
Referer: Search
Contact:

Re: Eliminate duplicate records

Postby Frank Yaeger » Mon Dec 24, 2007 9:57 pm

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:

Code: Select all

//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
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort


  • Similar Topics
    Replies
    Views
    Last post