Within proc IML of the SAS system from within a user-defined module I want to be able to access the data in a vector by taking as an argument the name of the vector.
For example in the code below the module called "test" builds the two strings "x_vec1" and "x_vec2" but does not print the contents of these two vectors, but rather prints their names (I think submit blocks produce the same results).
This concept is very easily accomplished using macros by calling IML within macros, but I want to do it purely in IML to keep the code "clean". Whilst IML is brilliant for statistical work I need more than this - I need to keep my code short by having an analogous concept as the macro variable which can be resolved within a function at run time.
proc iml;
start test(ep);
str = concat("x_",ep);
print str;
finish;
x_vec1 = J(10,1,34);
x_vec2 = J(10,1,67);
run test("vec1");
run test("vec2");
quit;