是用call execute语句在data步中调用宏,call execute()语句括号里面的参数一直写不对。
问题一:
跟crackman读sas(5)里面有一个例子:
data _null_;
do i=1 to 3;
call execute(cats('%inner(0,1,',put(i,best.),')')); %* %inner(0,1,i);*/
end;
run;
请问call execute(cats('%inner(0,1,',put(i,best.),')'));这句话中的',put(i,best.),',也即宏%inner()的第三个参数,为什么要加两个逗号?也即把',put(i,best.),'改成这样子'put(i,best.)'为什么就不行了?
问题二:
现在有一宏,%cov(name),name是形参。
想在data步中调用该宏,已经赋值好宏变量n1。
请问该如何调用?
我尝试了如下的方式是不行的:
call execute('%cov('||n1||')');
call execute('%cov('n1')');
call execute('%cov('put(n1,best.)')');
call execute('%cov(',put(n1,best.),')');
还请各位大侠指导!
1.