I want to create an array which stores the names of variables. Then index into the array and pass to a function. So far I have the following:
%let variables = cat dog lion sheep;
data _null_;
array a_vars[*] &variables;
do i = 1 to dim(a_vars);
some_function(a_vars[i],i);
end;
run;
I'm running into a problem with assigning the variables to the array and then indexing the array in the function to do: some_function(cat, 1)
or some_function(dog,2)
etc.