Proc sort data=Work.base;
by ID descending kid_age;
run;
Proc sort data=Work.base
out=clean
dupout=dups
nodupkey;
by ID;
run; if you want just duplicated values: Proc sort data=Work.base
out=dups
nouniquekey;
by ID;
run; with dupout you keep just deleted values on dups.
... View more