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
 
Help with Sort - Remove duplicate record based on condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Help with Sort - Remove duplicate record based on condition
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 Moderator


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

PostPosted: Fri Sep 19, 2008 9:32 pm    Post subject:
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    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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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