In order to allow sas to use blanks and special characters in the variable name without causing errors, the follwoing piece of code is used.
%LET VGROUP&I = "&&GROUP&I"N;
for instance &&group&I resolves to Cozar 24 FE, and then in subsequent step Vgroup&1 is transformed to a variable. In PC SAS it throws an error due to spacing issue.This is not the case when SAS is run on Mainframe.
If I have to run this on PC sas this is giving me an error.How to resolve this?
Make sure you're using the VALIDVARNAME=ANY option.
"Note: If you use any characters other than the ones that are valid when the VALIDVARNAME system option is set to V7 (letters of the Latin alphabet, numerals, or underscores), then you must express the variable name as a name literal and you must set VALIDVARNAME=ANY."