search across all the following databases:
Data and documentation
Common questions and answers.
Entire collection of data resources.
There are several ways to get rid of duplicate records in SAS. The examples below are for records that are exactly alike. If you need to get rid of records that have duplicate IDs, see Removing records with duplicate IDs.
proc sort; by id; data h; set input; by id; if first.id; proc print; var id h;
In the above case, 'last.id' can be used in place of 'first.id.'
proc sort noduprec; by id; proc print; var id h;