IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to filter out records with duplicate data?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Fri Dec 18, 2009 9:32 am
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 18, 2009 5:36 pm
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: 8797
Location: Welsh Wales

PostPosted: Fri Dec 18, 2009 6:07 pm
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: 1193
Location: Dublin, Ireland

PostPosted: Fri Dec 18, 2009 7:08 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Duplicate transid's declared using CEDA CICS 3
Search our Forums:

Back to Top