proc summary data=have nway;
class id;
var x y;
output out=want(drop=_:) sum=/autoname;
run;
/*or*/
proc sql;
create table want as
select id,sum(x) as sum_x ,sum(y) as sum_y
from have
group by id;
quit;
Special offer for SAS Communities members
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.