标题: 宏引用的位置 [打印本页] 作者: shiyiming 时间: 2011-7-14 14:14 标题: 宏引用的位置 [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后面呢?望高手们解析下...作者: shiyiming 时间: 2011-7-18 22:06 标题: Re: 宏引用的位置 should work well if you change your macro like this, just remove the semicolon ';' :
%macro COLS1;
Name Age
%mend;
%macro COLS2;
Height Weight
%mend;作者: shiyiming 时间: 2011-7-25 10:31 标题: Re: 宏引用的位置 [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]
谢谢!!