Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Removing duplicates based on two positions using ICEOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Removing duplicates based on two positions using ICEOOL
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    Post subject:
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    Post subject: Reply to: Removing duplicates based on two positions using I
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 Moderator


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

PostPosted: Thu Jul 02, 2009 8:49 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us