Hello: I would like to write a macro to representing my files name because the program is needed to run many times. However, the system showed syntax error. Please help. Thanks. %let libname=RF; %let filename=NG; %let year=2013; %let number=02; % X1=wage; % Y1=salary; data &libname.&filename&year(&number+2); set &libname.&filename&year&number; if &Y1 in (1,2) and &X1 in (1,2,5,6); run; 51 data &libname.&filename&year(&number+2); - 200 ERROR 200-322: The symbol is not recognized and will be ignored. 52 set &libname.&filename&year&number; - - - 22 200 200 200 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_. ERROR 200-322: The symbol is not recognized and will be ignored. WARNING: Apparent symbolic reference LIBNAME not resolved. WARNING: Apparent symbolic reference FILENAME not resolved. WARNING: Apparent symbolic reference YEAR not resolved. WARNING: Apparent symbolic reference NUMBER not resolved. ERROR: File WORK.FILENAME.DATA does not exist. ERROR: File WORK.YEAR.DATA does not exist. ERROR: File WORK.NUMBER.DATA does not exist. ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, -, :, ;, CUROBS, END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
... View more