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
 

 

How to filter out records with duplicate data?

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

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Fri Dec 18, 2009 9:14 am    Post subject: How to filter out records with duplicate data?
Reply with quote

Masters,

I want to code a SORT to filter out some records having duplicate data.
For example:
Code:

010 123456789 123456789tom20maleboston
010 123456788 123456777tim25malenewyork 


In the first record, there are two duplicate numbers 123456789, I want to remove any record in such a case.
In the second, 123456788 not = 123456777, so it should be kept.

How to code it?

Thanks!
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Dec 18, 2009 9:32 am    Post subject:
Reply with quote

Hello,

Suggest you look back about 12 hours in this part of the forum.

Your exact question was asked and answered. . .
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Dec 18, 2009 11:08 am    Post subject:
Reply with quote

Use below sortcard...
Code:

//SYSIN DD *                             
  SORT FIELDS=COPY                       
  OMIT COND=(5,9,ZD,EQ,15,9,ZD)         
/*                                       
Back to top
View user's profile Send private message
Lord.of.Wind

New User


Joined: 17 Nov 2005
Posts: 60

PostPosted: Fri Dec 18, 2009 3:31 pm    Post subject: Reply to: How to filter out records with duplicate data?
Reply with quote

Sorry I forgot one point.

How to filter out the duplicate-data record from the second, and the third, the fourth...?

Code:

010 123456789 123456789tom20maleboston
010 123456789 123456789May20femlboston
010 123456789 123456789Lee20maleboston
010 123456788 123456777tim25malenewyork


The second, the third should be filtered out.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Fri Dec 18, 2009 5:36 pm    Post subject: Reply to: How to filter out records with duplicate data?
Reply with quote

did You care to try to understand, and maybe test the snippet given by Sambhaji ?
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: Fri Dec 18, 2009 6:07 pm    Post subject:
Reply with quote

Load.of.Wind

Can you kindly take the time to explain EXACTLY what it is that you want to do. From your posts so far I am not sure if you are still talking comparing record fields internally, or if you want whole records which are duplicates of others to be filtered out as well.

Show the input, with RECFM & LRECL
Show the desired output, again with RECFM & LRECL

Explain the rules for getting from input to output.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Dec 18, 2009 7:08 pm    Post subject:
Reply with quote

expat

Quote:
Load.of.Wind


.. a bit harsh, maybe, on "LoRd.of.Wind" ?

Garry.[/quote]
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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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