I took data _null_'s first sample code and converted it into a stored process. I tested the code on a stored process server running SAS®9.2 creating HTML, RTF or PDF. It also works with streaming or package output.
[pre]
data class;
set sashelp.class;
run;
data class;
modify class;
remove;
run;
data _null_;
if (eof) then do;
call symput('_ODSOPTIONS', "text='No Obs to report'");
end;
stop;
set class(keep=name) end=eof;
run;
%STPBEGIN;
title 'Title for report';
proc report data=class nowd list; run; quit;
%STPEND;
[/pre]
Vince DelGobbo
SAS R&D
... View more