I think that you have omitted some vital information here. I would hazard a guess that this input has come from another operating system and may have a unicode seperator embedded into the data, which means that you have multiple records on each line.

However, if this is not the case you need to describe your requirement in far more detail than you already have.

Hi,
Sorry, please see if the below information helps.
Input file is a comma separated file. Each field has variable lengths.
Each line has only one record.
Total lrecl of the file is 646.
I want to remove duplicate records.

the solutions we posted got rid of the duplicates without altering the original ordering,
but will work only for contiguous duplicates
if the duplicates are not contiguous as I said before I feel that a multi pass approach is needed!

too bad that the TS is using Syncsort,
I guess that we are bound to miss Frank and Kolusu smart solutions!

I searched the forums for non contiguous duplicates keeping the original order and the first occurrence, but I was not able to find anything