consider the following data
Data ss;infile datalines;input ename $;datalines;RamSitaRamArjunSitaRamArjun;run;#outputRamSitaArjun
I know other approaches like by sorting the data by ename and then using the first., but this way we need to sort data and the output will be starting with Arjun, Ram and Sita. However, we need to retain the order like i mention in the expected output.
proc sort data=ss;by ename;run;data want;set ss;by ename;if first.ename;run;