SAS中文论坛
标题:
怎样有条件的推出宏循环?
[打印本页]
作者:
shiyiming
时间:
2006-8-3 19:57
标题:
怎样有条件的推出宏循环?
再宏当中为什么不可以用 %if %then leave;跳出宏循环呢?
作者:
shiyiming
时间:
2006-8-4 11:28
标题:
用%goto
[code:01249]%macro check(parm);
%local status;
%if &parm= %then %do;
%put ERROR: You must supply a parameter to macro CHECK.;
%goto exit;
%end;
more macro statements that test for error conditions
%if &status > 0 %then %do;
%put ERROR: File is empty.;
%goto exit;
%end;
more macro statements that generate text
%put Check completed successfully.;
%exit: %mend check;[/code:01249]
作者:
shiyiming
时间:
2006-8-4 16:08
标题:
to talent598
因为leave不是宏语句,呵呵呵.
欢迎光临 SAS中文论坛 (http://mysas.net/forum/)
Powered by Discuz! X3.2