MainframeMaster
Thread: DFSORT and ICETOOL

ICETOOL JCL example using ALLDUP

Started by Anonymous • user2 replies2 viewsLast activity 3 days ago
Post #1
0 votes
Anonymous
Reputation
0
Posts: 15
Joined: Aug 16, 2026, 10:13 AM
Posted: Sep 15, 2026, 1:19 AM

ICETOOL JCL example using ALLDUP

---
Posted anonymously from tutorial: /tutorials/dfsort/dedup-separate-files

Post #2
0 votes
stagarono
Reputation
0
Posts: 2
Joined: Dec 5, 2025, 4:18 PM
Posted: Sep 15, 2026, 6:44 AM

To extract all duplicates you could use the following ICETOOL:


SELECT FROM(IN) TO(DUPES) ON(1,10,CH) ALLDUPS DISCARD(UNIQUE)

IN = Input File
Dupes = First output file contain duplicate records.
Unique = A second output file containing the rest of the non duplicate records.

On(1,10,CH) = the field or full record to match on for duplicates.

If you want to match on multiple fields you can do something like ON(1,10,CH) ON(15,5CH) and have multiple ON statements.

You must be signed in to reply to this thread