View previous topic :: View next topic
|
Author |
Message |
Achutha
New User
Joined: 21 Oct 2009 Posts: 2 Location: India
|
|
|
|
Hi ,
I have a file as below :
AA
BB
BB
CC
CC
CC
CC
DD
DD
DD
DD
EE
If any record is duplicated more than three times I want to remove it.
The output file should be ( remove fouth occurence of CC and DD)
AA
BB
BB
CC
CC
CC
DD
DD
DD
EE |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
You can try using the below JCL.
Code: |
//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(1,2,CH) FIRST(3)
/* |
It shud do the job I guess.
Thanks & Regards, |
|
Back to top |
|
|
Achutha
New User
Joined: 21 Oct 2009 Posts: 2 Location: India
|
|
|
|
Hi Vasanth,
Thanks a lot.It is working.
Achutha |
|
Back to top |
|
|
|