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

Help with Sort - Remove duplicate record based on condition


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vinutha Chandrakumar

New User


Joined: 11 Sep 2008
Posts: 1
Location: Bangalore

PostPosted: Fri Sep 19, 2008 7:21 pm
Reply with quote

Hi,

Require help on Sort.

Input file has the below format:

123, aaa, 222, F, 2008-09-19
321, aaa, 222, F, 2008-09-19
123, aaa, 222, S, 2008-09-19

Output after sorting is:

123, aaa, 222, F, 2008-09-19
123, aaa, 222, S, 2008-09-19
321, aaa, 222, F, 2008-09-19

I want the duplicate to be removed only if the 4th column has S, which is in my above example the 2nd record should be removed.

So my ideal output is:

123, aaa, 222, F, 2008-09-19
321, aaa, 222, F, 2008-09-19

Please help me with the syntax for the above.

Regards,
Vinutha
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Sep 19, 2008 9:32 pm
Reply with quote

You need to explain your requirement in more detail. You need to give more input records with all of the variations, show the expected output records, and explain the "rules" better. Are you checking for duplicates on all of the fields except the 'S'/'F' field? Can that field have only 'F' or 'S' values? If not, what do you want to do for other values? What do you want to do if there are two duplicate 'F' records or two duplicate 'S' records or combinations of more than one 'F' and 'S' record?
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top