Page 1 of 1

Copy duplicate records, more than 3, in output?

Posted: Wed Oct 15, 2014 2:47 pm
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?

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

Posted: Wed Oct 15, 2014 3:10 pm
by William Collins
Yes, look at ICETOOL's SELECT operator, which has many options to deal with duplicate keys.

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

Posted: Wed Oct 15, 2014 6:37 pm
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) 
/*