fallleafsean 发表于 2013-1-9 10:00 
非常感谢~
%macro checknobs(dsn);
data _null_;
if nobs=0 then do;
call symput(“obscount”,”0″);
file print notitles;
put “there are no observations in &dsn”;
end;
else call symput(“obscount”,put(nobs,best12.));
stop;
set &dsn nobs=nobs;
run;
%if &obscount >0 %then %do;
proc print data=&dsn(obs=10);
title1 “a few observations from &dsn”;
run;
%end;
%mend checknobs;
%checknobs(SASHELP.CLASS)
%checknobs(SASHELP.DPLOG)
关于”编译“和“执行”的问题
这是网上查到的crackman的关于空集判断的宏程序,我试了下如果不加stop确实会出错,为什么会出现这个问题呢?