我能够将宏变量解析为我期待的名称。但是proc数据集中的delete语句未被识别。如何使它工作?
PROC DATASETS LIB=WORK NODETAILS NOLIST;
DELETE &INPUT._mi &INPUT._lc ;
RUN;
MPRINT(GET_true_value): PROC DATASETS LIB=WORK NODETAILS NOLIST;
NOTE: Line generated by the macro variable "INPUT".
108 work.true_value_mi
__________________
22
201
MPRINT(GET_true_value): DELETE work.true_value_mi work.true_value_lc ;
NOTE: Enter RUN; to continue or QUIT; to end the procedure.
MPRINT(GET_true_value): RUN;
ERROR 22-322: Expecting a name.
ERROR 201-322: The option is not recognized and will be ignored.
NOTE: Statements not processed because of errors noted above.
109
答案 0 :(得分:3)
看起来问题是所写的delete语句包含库名。这不是必需的(并抛出错误),因为在PROC DATASETS语句中指定了库。
您希望宏变量解析为:
PROC DATASETS LIB=WORK NODETAILS NOLIST;
DELETE true_value_mi ;
RUN;