You can use the following PROC TRANSPOSE to do this:
data have;
input id var1 var2 var3;
cards;
1 101 102 .
;
run;
proc transpose data=have out=want(drop=_name_ where=(col1 ne .));
by id;
var var1 var2 var3;
run;
proc print data=want;
run;
2025 SAS Hackathon: There is still time!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!