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: 7315

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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


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