Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Apr 23, 2003 2:49 pm Post subject:
Eswar,
If you want to keep non-duplicates and the first record of each set of duplicates, you can do that with the following DFSORT/ICETOOL job:
Code:
//DOIT EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input data set
//OUT DD DSN=... first record with each key
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(p,m,f) FIRST
/*
p,m,f is the starting position, length and format of the key (e.g. 11,20,CH).
Besides FIRST, DFSORT's ICETOOL also lets you use LAST, FIRSTDUP, LASTDUP, ALLDUPS, NODUPS, HIGHER(n), LOWER(n), EQUAL(n) and DISCARD(savedd) to do all kinds of other things with duplicates and non-duplicates.
For more information on this, see the "Keep dropped duplicate records (XSUM)" Smart DFSORT Trick at:
(You can also use SUM FIELDS=NONE to remove duplicates, but ICETOOL's SELECT operator is much more versatile.) _________________ 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
Last edited by Frank Yaeger on Thu Sep 14, 2006 4:33 pm; edited 1 time in total
Thank you very much Frank. I tried using sum field= NONE and It worked fine.
But I just want to know How can I find whether I have ICETOOL in our system. becasue we have not used anywhere ICETOOL in our sytem. we use only EXEC PGM=SORT.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Apr 23, 2003 4:23 pm Post subject:
Eswar,
If you are using DFSORT, then you have ICETOOL. To determine if you're using DFSORT, look at the messages in SYSOUT from your PGM=SORT run. If they start with ICE (e.g. ICE000I), then you have DFSORT and ICETOOL. If they start with WER or anything else, then you don't have DFSORT or ICETOOL.
If you are using DFSORT, try ths DFSORT/ICETOOL job to prove to yourself that you have ICETOOL. (If you use a JOBLIB or STEPLIB to get to DFSORT, use the same JOBLIB or STEPLIB in the ICETOOL job below.)
_________________ 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
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum