In SAS/IML I have defined a character variable:
var1 = "usernames";
Previously in the code I defined usernames as a matrix:
usernames = {bill george fred, matthew john mark, katie, jack, lucy};
How can I manipulate this so that when I type
print var1;
I get the usernames matrix as output?
I think the OP wants to reference the contents of what the var1 variable “points to.” Use the VALUE function:
The VALUE function and the VALSET call can be used for this kind of indirect assignment and retrieval in SAS/IML.