Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10457
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: 8657
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

Senior Member


Joined: 08 May 2006
Posts: 1005
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 3270 Data stream error Benchwarmer CICS 6 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us