IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Removing duplicates based on two positions using ICEOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harithb

New User


Joined: 08 Jun 2009
Posts: 15
Location: Bangalore

PostPosted: Thu Jul 02, 2009 8:25 am
Reply with quote

Hi,

I have a flat file which will have a number of records. Each record has length 80.

My requirement is to remove records where duplicates can occur in positions 10-20 and 30-40. That is if two records have same value in positions 10-20 and 30-40 (remaining positions need not have same values), then those records should be eliminated.

Is this possible using icetool ? If yes, how ?

Thanks in advance.
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Thu Jul 02, 2009 10:05 am
Reply with quote

Hi ,
Please try the below code in ICETOOL

Code:
SELECT FROM(IN) TO(OUT) ON(10,10,CH,.30,10,CH) NODUPS
Back to top
View user's profile Send private message
harithb

New User


Joined: 08 Jun 2009
Posts: 15
Location: Bangalore

PostPosted: Thu Jul 02, 2009 10:55 am
Reply with quote

Yes. I tried it and it is working. Thank you.

But I have a problem here. The input file has a header and a trailer which will always have spaces from position 15 till 80. And since they are the same in these positions (having spaces in both header and trailer) both of them are getting deleted in the output file icon_sad.gif

The trailer is identified by the first position 'Z'. The trailer should have the count of number of records in the output file and I think I can use COUNT and again write one more output file in a new step after the step having removal of duplicate records.

But how should I be handling the header record. The header record is identified by the first position which is always an 'A'.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jul 02, 2009 8:49 pm
Reply with quote

Please show an example of the records in your input file and what you expect for output.

Give the RECFM of the input file.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts To search DB2 table based on Conditio... DB2 1
This topic is locked: you cannot edit posts or make replies. Merge 2 input files based on the reco... JCL & VSAM 2
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts Mass JCL release via IDZ tool(eclipse... CA Products 1
Search our Forums:

Back to Top