*put* line 1 of tSortedData is false into lastLine
*repeat* for each line L in tSortedData
*if* L is lastLine *then* *next* *repeat*
*put* L & cr after tUniqueData
*put* L into lastLine
*end* *repeat*
Either that or some form of Peter's de-dupe and then sort.