Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS Macro variable in a valid var name all name (i.e. SAS var w space)

Status
Not open for further replies.

mdieckman

MIS
Nov 21, 2006
88
0
0
US
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:

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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top