Is there anyway to suppress ODS completely, or is there anyway to delete an html output or sas report using code? My problem is when I run the code below, SAS still produces an HTML file and SAS report with nothing in it. I want to either suppress the creation of these output files or delete them after they have been produced. My motivation is that I'm trying to create a process flow branch in SAS Enterprise Guide that only includes SAS programs and datasets. I find that the creation of this html file and SAS report makes the branch look messy, especially since these files are blank anyway.
Thank you for any help you can provide.
Sincerely,
Bill
ODS EXCLUDE ALL;
ODS OUTPUT PARAMETERESTIMATES(PERSIST=RUN)=EST;
PROC REG DATA = DATA
MODEL Y = X;
RUN;
ODS OUTPUT CLOSE;
ODS EXCLUDE NONE;
Then close all ODS destinations before you run the procedure, and open only ODS OUTPUT.
Execute conditionally?
proc sql noprint;
select nobs into :nobs
from dictionary.tables
where libname = 'WORK' and memname = 'DATA';
quit;
%if &nobs. > 0
%then %do;
ODS EXCLUDE ALL;
ODS OUTPUT PARAMETERESTIMATES(PERSIST=RUN)=EST;
PROC REG DATA = DATA
MODEL Y = X;
RUN;
ODS OUTPUT CLOSE;
ODS EXCLUDE NONE;
%end;
Then you could conditionally create the NOPRINT option in the PROC REG statement:
%let nobs=0;
proc sql noprint;
select nobs into :nobs
from dictionary.tables
where libname = 'WORK' and memname = 'DATA';
quit;
proc reg data=data
%if &nobs. = 0
%then %do
noprint
%end;
;
Then close all ODS destinations before you run the procedure, and open only ODS OUTPUT.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.