SAS appears to resolve the macro variable ­r. The error occurs in the DATA step when I attempt to create a permanent data set.
My code:
options SYMBOLGEN; %let yr=2017; %let shyr=%qsubstr(&yr,3,2); %put ­r;
***** LIBNAME *****; libname eocep "G:\Departments\Research\test scores\EndOfCourse\&yr.";
data one;
..
run; /*the data step is error-free*/
*CREATE RAW PERM DATA SET*; data eocep.eocep_spr­r._raw; set one; run;
LOG:
177 *CREATE RAW PERM DATA SET*; SYMBOLGEN: Macro variable SHYR resolves to 17 SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. 178 data eocep.eocep_spr­r._raw; NOTE: Line generated by the macro variable "SHYR". 1 eocep.eocep_spr17_raw -- 22 -- 200 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
179 set one; 180 run;
NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set EOCEP.EOCEP_SPR may be incomplete. When this step was stopped there were 0 observations and 142 variables. WARNING: Data set EOCEP.EOCEP_SPR was not replaced because this step was stopped. WARNING: The data set WORK._RAW may be incomplete. When this step was stopped there were 0 observations and 142 variables. WARNING: Data set WORK._RAW was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.09 seconds cpu time 0.01 seconds
... View more