Reply To: What are the SAS Array Functions?

#49306
rlochan2021
Keymaster

VNAME Function

You can use the VNAME function to identify the name of a variable that is associated with an element of an array. The name
of the array, along with the element number that appears within brackets, is passed as the single argument to the VNAME
function, as shown in this example:

array my_array[*] A B C;
i=2;
var_name=name(my_array[i]);
In this case, the value of the VAR_NAME= variable is B.