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

Eliminate duplicates based on multiple columns


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

New User


Joined: 05 Mar 2009
Posts: 46
Location: Hyderabad

PostPosted: Thu Feb 28, 2013 12:58 pm
Reply with quote

I've only one input file in which I have to eliminate duplicates based on some columns which are scattered across file.

I've to eliminate duplicates based on first 2 bytes and based on 4-5 bytes

My input is like this

AA1ZZ
AA2YY
AA3ZZ

Expeted output is as below:

AA1ZZ
AA2YY

Can somebody suggest me solution using ICETOOL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 28, 2013 1:08 pm
Reply with quote

SUM FIELDS=NONE
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 28, 2013 1:16 pm
Reply with quote

Have a look at ICETOOL's SELECT operator.

If the data is already sorted, account for that in a ctlnCNTL file.

It can equally be done with PGM=SORT. As expat says, SORT on your fields and SUM FIELDS=NONE if the data needs sorting. If the data is already sorted, you can use MERGE with just SORTIN01 and SUM FIELDS=NONE.

For can also look at the reporting features of OUTFIL.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
Search our Forums:

Back to Top