BookmarkSubscribeRSS Feed
glmsas
Calcite | Level 5
In Data step processing, is there a way to get the variable name from the array element
so like this
data t;
a=1;
b=2;
c=3;
array cols{*} a--c;
do i=1 to dim(cols);

if cols(i) ='a' then .....
end;

where you want the var name not the value?
thanks

run;
2 REPLIES 2
Flip
Fluorite | Level 6
look at vname and vnamex
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1384 views
  • 0 likes
  • 2 in conversation