Using PROC TRANSPOSE to get a list of variable names
I'm not a fan of PROC TRANSPOSE; there's almost nothing it can do that I can't do in a data step or PROC SQL. But back in August of 2004 on SAS-L, Michael Murff proposed a use of PROC TRANSPOSE which even I would support:
proc transpose data=sasuser.iris (obs=0)
out=xnames (keep=_name_);
var _all_;
run;
I added "obs=0" to the original proposal to speed processing, and Ya Huang
added "var _all_" to get all variables, not just numeric ones.

0 Comments:
Post a Comment
<< Home