View previous topic :: View next topic |
Author |
Message |
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Nov 28, 2002 12:04 pm Post subject: Get only duplicate Records in a file |
|
|
The following DFSORT/ICETOOL JCl will give you the desired Results.Assuming that the duplicate key is of 10 bytes length and starts in position 1
Code: |
//STEP0100 EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=INPUT.FILE,
// DISP=SHR
//OUT DD DSN=OUPUT.DUPSKEYS,
// DISP=(,NEW,CATLG,DELETE),
// UNIT=SYSDA
// SPACE=(CYL,(X,Y),RLSE)
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,10,CH) ALLDUPS
/*
|
For more information on DFSORT's ICETOOL, see:
http://www.storage.ibm.com/software/sort/mvs/icetool/index.html |
|
Back to top |
|
|
Nabanita Das Beginner
Joined: 09 Nov 2005 Posts: 33 Topics: 10
|
Posted: Wed Nov 23, 2005 5:25 am Post subject: |
|
|
What should we use in the toodd if we need all non duplicate data as well as all dups data in separate datasets? |
|
Back to top |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Wed Nov 23, 2005 11:29 am Post subject: |
|
|
If you want one record with each key in one data set, and any other records with duplicate keys in another data set, you can use the "Keep dropped duplicate records (XSUM)" Smart DFSORT Trick at:
http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
If you want something else, then you need to explain exactly what you want with an example of your input records and expected output records. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
davinski.bby Beginner
Joined: 30 Jul 2007 Posts: 31 Topics: 10
|
Posted: Sat Aug 04, 2007 12:17 am Post subject: |
|
|
Thanks for the help... |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sat Aug 04, 2007 2:22 am Post subject: |
|
|
This page should become a sticky. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
|
|