Rod! By showing an example you are on your own so close to the solution: the three first chars are your sort key and I suppose the numbers should stand for accompanying data of any kind. Now, what about inserting a count field after SORT and deciding what to do discard depending on that count field. Sorry - no time for coding this idea in PIPE stages.
Ciao.....Mike
