I have a large data report where I am opening the ODS RTF output file and then calling several files using %include to fill in the content. These documents contain various data manipulations, followed by the output I desire to have. All of them run fine with the exception of one. In that file I am using a number of statements similar to the following:
ods exclude all;
ods output OddsRatio(persist=proc)=odds_basb_act(where=(Statistic="Column 2 Relative Risk"));
proc surveyfreq data=GLSDesign_basb3;
strata strata;
weight nationalweight;
tables sport_name_girls_softball*(act_:)/ or noprint;
run;
proc surveyfreq data=GLSDesign_basb3;
strata strata;
weight nationalweight;
tables sport_name_boys_baseball*(act_:)/ or noprint;
run;
ods output close;
ods exclude none;
I expected this to be ignored by the output, but instead it appears to be creating a blank line (or several) in the ODS RTF output every time it runs. How can I correct this?
Have you tried this
To temporarily suspend a destination, use ODS SELECT NONE. Use ODS SELECT ALL when you want to resume sending output to the suspended destination.
as stated in the documentation?
Sorry, no more idea. Maybe @Cynthia_sas has one?
Thanks for the information. Yes, I did remove it from the ODS RTF sandwich and the issue went away. This is doable, but something I was trying to avoid.because it disrupts the normal flow of the overall document—a report where each section has been created as a stand-alone file including its own data work followed by RTF output, all glued into a master using %INCLUDE. The PROC SURVEYFREQ serves to generate relative risk CIs that are included in a data table used in a PROC REPORT statement. To get this issue to go away, I separated the data and desired output portions into two files for that section and ran the data portion before the initial opening of the ODS RTF output in the master file.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.