SASKiwis idea will work if you don't need to retain the first case in the data. Here is what I cam up with. This uses a hash object so will only scale to the size of the available memory on your system.
data have;
length ID 8 FirstName LastName $8;
input ID FirstName LastName;
cards;
001 John Reed
001 JOHN REED
002 Mitchel James
003 Steph Ania
004 King Mon
004 KING MON
005 Valery Short
012 ALMA JACOBS
012 Alma Jacobs
017 Josh Ryan
017 Jash Ryan
;
run;
data want;
if _n_ = 1 then do;
declare hash h();
rc = h.defineKey('ID','FirstName_upcase','LastName_upcase');
rc = h.defineDone();
end;
set have;
FirstName_upcase = upcase(FirstName);
LastName_upcase = upcase(LastName);
rc = h.find();
if (rc ~= 0) then do;
rc = h.add();
output;
end;
keep ID FirstName LastName;
run;
This will keep the first observation with unique spelling and retain the case. If the varaible was "JoHn" in the first observation the propcase method would make this "John".
... View more