Can someone please tell me why the second "proc contents" below gives me errors, while the first one is OK? The error is shown at the bottom. Thank you! %macro foo(date); work.abc_&date. %mend; %let date=201402; data abc_&date.; run; data abc_&date._ext; run; %let input=%foo(&date.)_ext; proc contents data=&input.; run; proc contents data=%foo(&date.)_ext; run; 39 proc contents data=%foo(&date.)_ext; MLOGIC(FOO): Beginning execution. SYMBOLGEN: Macro variable DATE resolves to 201402 MLOGIC(FOO): Parameter DATE has value 201402 SYMBOLGEN: Macro variable DATE resolves to 201402 39 proc contents data=%foo(&date.)_ext; ____ 22 ERROR 22-322: Syntax error, expecting one of the following: ;, (, CENTILES, DATA, DETAILS, DIR, DIRECTORY, FMTLEN, LIB, MEMTYPE, MT, MTYPE, NODETAILS, NODS, NOPRINT, ORDER, OUT, OUT2, SHORT, VARNUM. 39 proc contents data=%foo(&date.)_ext; ____ 202 ERROR 202-322: The option or parameter is not recognized and will be ignored. MPRINT(FOO): work.abc_201402 MLOGIC(FOO): Ending execution. 40 run;
... View more