Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Eliminate duplicates based on multiple columns

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Chinnadu

New User


Joined: 05 Mar 2009
Posts: 42
Location: Hyderabad

PostPosted: Thu Feb 28, 2013 12:58 pm    Post subject: Eliminate duplicates based on multiple columns
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: 8593
Location: Back in jolly old England

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

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu Feb 28, 2013 1:16 pm    Post subject: Reply to: Eliminate duplicates based on multiple columns
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    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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us