Hello SAS community, I am new to SAS programming. I have a data set with say, 20 variables. Suppose that I want to set up a one-to-one correspondence between these variables and variables called x_1, x_2,...,x_20. I have more of a mathematical background and find it is much easier to perform calculations and other procedures when we refer to the ith variable as x_i rather than ith-variable-name, which in my view streamlines subsequent programming. From what I understand, these data sets are essentially matrices, in something like MATLAB one can specify a column (variable) simply as x(:,j), this is where my intuition is coming from, however I am struggling to find similar analogies in SAS. Is there a straight forward way to map k non-indexed variables {var,bar,car,....,zar} to {x1,x2,...,xk} and back again? Another question: Does there exist a function which I can apply to a data set which returns the number of variables? Thank you for taking the time to read this
... View more