[code:2buh2eqn]%macro COLS1;
Name Age;
%mend;
%macro COLS2;
Height Weight;
%mend;
proc print data=SASHELP.CLASS;
[_insert_VAR_statement_here_]
run; [/code:2buh2eqn]
有4个选项:
A. var %COLS1 %COLS2;
B. var %COLS1-%COLS2;
C. var %COLS1 Weight Height;
D. var Weight Height %COLS1;
想问的问题是,为什么宏引用不能直接放在var后面呢?望高手们解析下...
[quote="sun59338":2axj86r9]should work well if you change your macro like this, just remove the semicolon ';' :
%macro COLS1;
Name Age
%mend;
%macro COLS2;
Height Weight
%mend;[/quote:2axj86r9]
谢谢!!