当前位置: 动力学知识库 > 问答 > 编程问答 >

About SAS macro——how to use abs()/std()

问题描述:

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().

分享给朋友:
您可能感兴趣的文章:
随机阅读: