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

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 catalog a gdg dataset resid... Shovan JCL & VSAM 4 Fri Mar 24, 2017 2:24 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm


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