I have the need to create a variable name with a space and add a macro variable to the end. I'm having a bit of trouble with the syntax.
I have really simplified my example as not to get into the other complexities of my program.
Essentially, I want the variable name to resolve to First Name1:
But as of right now &cnt does not resolve. This of course works fine without the validvarname=all option, but I need it to work with a SAS variable with spaces. Anybody?
I have really simplified my example as not to get into the other complexities of my program.
Essentially, I want the variable name to resolve to First Name1:
Code:
data x;
%let cnt = 1;
'First Name&cnt.'n = 1;
run;
But as of right now &cnt does not resolve. This of course works fine without the validvarname=all option, but I need it to work with a SAS variable with spaces. Anybody?