View previous topic :: View next topic
|
Author |
Message |
msrini
New User
Joined: 12 Apr 2010 Posts: 5 Location: India
|
|
|
|
Hello,
I am trying SORT to remove duplicates in a file of comparing 3 different columns.
as a example:
Code: |
22 30 48 - column number
1 2 3 4 5 6
....5....0....5....0....5....0....5....0....5....0....5....0 - - a ruler
LPGS0BAU CIF COBBCH TESTA E1CBLEB
LPGS0BAU CIF COBBCH TESTA E1CBLEBD
LPGS0BAU CIF COBBCH TESTA E1CBLEBS
LPGS0BAU CIF COBBCH TESTA E1CBLEB23X
LPGS0BAU CIF COBBCH TESTA E1SHARE
LPGS0BAU CIF COBONL TESTA E1CBLEO23
LPGS0BAU CIF COBONL TESTA E1CBLEO23D
LPGS0BAU CIF COBONL TESTA E1CBLEO23S
LPGS0BAU CIF COBONL TESTA E1SHARE |
I am using
SORT FIELDS=(22,8,CH,A,30,8,CH,A,48,8,CH,A)
SUM FIELDS=NONE,XSUM
It's removing some duplicates but still few exist.
Can any one help me on this.
Thanks & Regards,
Srini |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I'm somewhat lost with your example and not sure what do you mean by this
Quote: |
It's removing some duplicates but still few exist. |
? Can you please post the expected output from the input? |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Your third field start location of 48 looks wrong based on your example. And the length appears greater than 8. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
A "ruler" has been added to the data for readability.
It looks like the 48 should be 38 and as Bill mentions, the length appears to be more than 8 - depending on the end of the field.
You didn't bother to post the unwanted output, so we can only guess. . . |
|
Back to top |
|
|
|