Hi All,
I want to remove set of duplicates(not similar rows) from my input file .
Ex:
1st postion : header or trailer or remark
2 to 6 : primary key field
1st set of records
012345AAA --- > The record with '0' at 1st position is HEADER
112345AAA ---- > All the records with '1' AT 1ST position are DETAILS
112345AAA
212345AAA --- > All the records with '2' at 1st are REMARKS
2nd set of records
023456BBB
223456BBB
223456BBB
123456BBB
223456BBB
3rd set of records
012345CCC
212345CCC
112345CCC
212345CCC
212345CCC
Remarks can be present for header or detail or for both.
Now, I want to delete either 1st or 3rd set of records irrespective of how many detail or remark records present.
Required Output
012345AAA
112345AAA
112345AAA
212345AAA
023456BBB
223456BBB
223456BBB
123456BBB
223456BBB
OR
023456BBB
223456BBB
223456BBB
123456BBB
223456BBB
012345CCC
212345CCC
112345CCC
212345CCC
212345CCC
I can write program to acheive this but I want to kown easier way to do the same using DFSORT.