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?
Copy duplicate records, more than 3, in output?
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Copy duplicate records, more than 3, in output?
Yes, look at ICETOOL's SELECT operator, which has many options to deal with duplicate keys.
- Anuj Dhawan
- Founder
- Posts: 2799
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Copy duplicate records, more than 3, in output?
Hi,
As William has said, try this:
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.
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.
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