Vinutha Chandrakumar
New User
Joined: 11 Sep 2008 Posts: 1 Location: Bangalore
|
|
|
|
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 |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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? |
|