问题描述:

I write a macro sentence in SAS :

%macro loop;

%let sigmav=0.1;

.....

%let sigmav_new=std(V);

%if abs(%eval(&sigmav-&sigmav_new))<0.001 %then %do;

......

%mend;

But there are always errors of abs( ) and std( ). So I wonder whether there are special rules to express the function of abs() and std() in a macro. Hope for your help!

网友答案:

If you want to call a SAS function in a macro (and outside of a data step), you need to enclose it in %sysfunc().

相关阅读:
Top