proc sql noprint;
select count(abvar) into : abnobs trimmed from absent1;
quit;
data origin_diff;
set absent1 nobs=nobs end=eof;
if &abnobs. ne 0 then do;
if _n_=1 then put "****************************************************************************";
put "WAR" "NING: warning[" +1 abvar"].";
if eof then put "****************************************************************************";
end;
else if &abnobs.=0 then do;
put "****************************************************************************";
put "there is not a warning.";
put "****************************************************************************";
end;
run;
note:
abvar是存储信息的变量。
WAR" "NING:这样写可以防止warning单词分开!
SAS脚本处理警告:SQL查询与数据差异检查
该篇文章介绍了使用SAS编程语言执行SQL查询,统计变量abvar在数据集absent1中的缺失情况,并处理可能出现的警告信息。
832





