Needed assistance for Sorting a file based on 3 fields and then removing duplicates on the same file with 2 of the three sorted fields in a single sort step , Is that possible ?
I will further explain it as :
Input as :
NAAA01AA
NAAA02AA
NAAA03AA
NAAB01AA
NAAB01AB
NAAB03AA
NAAA02AA
NAAA03AA
NAAB01AA
NAAB01AB
NAAB03AA
1st Step Sort curently using :
SORT FIELDS=(1,4,CH,A,5,2,BI,A,7,2,CH,A)
2nd Step Sort currently using :
SORT FIELDS=(1,4,CH,A,5,2,BI,A),
EQUALS
SUM FIELDS=NONE
EQUALS
SUM FIELDS=NONE
Output is :
NAAA01AA
NAAA02AA
NAAA03AA
NAAB01AA
NAAB03AA
NAAA02AA
NAAA03AA
NAAB01AA
NAAB03AA
Record eliminated is
NAAB01AB
as the first 6 bytes were same hence considered a duplicate and removed.
I wish to implement this into a single step, Is that possible.
Thanks a Ton,
Saurabh