09-13-2013 09:51 AM
I have variables that have spaces
Example Variable Names
in my program I converted the variables using an assignment as follows:
B_GGR = 'B GGR',n;F_CCR='F CCR'n;
I get errors
B GGR is not a valid sas name.
F CCR is not a valid sas name.
Should not the use of the '',n resolve the issue with variables that have spaces?
09-13-2013 10:17 AM
do you want label your variables or create new variables?
label b_bb='B BB';
proc print data=want label;
Obs B BB
09-13-2013 10:39 AM
If you truly have variables with spaces in the name then yes, the ''n notation should allow them to work, however SAS will sometimes convert them itself, but leaves the labels with the spaces.
You can run a proc contents on your dataset to see if that happened.
You can also try the
to see if that helps.