Thanks.But still I am facing the same issue.The sequence number is getting restarted from 1 eventhough the key is not changed.I need to restart the sequence number only if the key is changed which is first 8 bytes.Could you please help on this?
If you are using INREC to put your sequence number on, then it is the unsorted file that you are using - which is the reason you notice something is not working. Change it so that it is with the OUTREC,
As saiprasadh has pointed out, you are not looking at the whole seqence number. This will cause you to think that every 10th record is a "new" sequence.