Copy duplicate records, more than 3, in output?

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Post Reply
Umar A
New Member
Posts: 1
Joined: Wed Aug 13, 2014 9:17 pm

Copy duplicate records, more than 3, in output?

Post by Umar A »

Hi,

I have a file file-1 in which some records are present. Some of them are duplicate. I want to copy the records from this file1to output file, which are repeating more than 3 times. How I can achieve this?
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Copy duplicate records, more than 3, in output?

Post by William Collins »

Yes, look at ICETOOL's SELECT operator, which has many options to deal with duplicate keys.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Copy duplicate records, more than 3, in output?

Post by Anuj Dhawan »

Hi,

As William has said, try this:

Code: Select all

//STEP1   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(p,m,f) HIGHER(3) 
/*
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”