Hello, I'm trying to iterate over a list of variables in a data step, and for each one I want to create a new variable that is identical to the original but has the suffix "_new". Is this possible to do without resorting to using a macro (i.e. just in a data step)? So, what I'm trying to achieve is something along the lines of (I know the below syntax is wrong): %let varlist = varA varB varC ... varZ; for each var in &varlist do; var_new = var; end; Giving me a new set of varaibles varA_new etc. taat are identical to the originals. I've worked out a way to do this using %scan(&varlist, &i) in a macro, but this is a small bit of a much larger data step and it's not easy to create new macros in the project I'm working on.
... View more