I need to remove the duplicates within a group. In the above sample, there are 3 records under 01 - HEADER followed by another group. In this first group the second record is a duplicate and has to be removed. the required output is as follows:
Thanks for your advice Peter. I went through the manuals and various posts here based on which I tried the following SORTCARD.
But this sortcard sorts the header too. Though I understand why it sorts it, but I am not able to avoid it. Can someone let me know how can I avoid sorting the header of the group and retain it at the top of the group.
Certainly not an efficient way to sort. But nevertheless I was able to achieve what I was looking for . I will go with your second suggestion since the job is done in a single step without any intermediary temp files.