The SAS Output Delivery System and reporting techniques

Turning ODS results off

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 134
Accepted Solution

Turning ODS results off

I'm running proc tpspline with a large number of by groups (9.4 TS1m0 on WinX64). If i run it in batch mode it works fine. However, when I run it interactively it is very slow. I tried

ods graphics off;

ods results off;

which helped somewhat. However, the program still seems to be writing the tpspline results to the Results window (not the graphics). And the large size of this file is slowing my system down. Curiously the tpspline results are not listed in the Results Tab - but they do appear in the Results Viewer window.


Accepted Solutions
Solution
‎05-26-2015 09:03 PM
Frequent Contributor
Posts: 134

Re: Turning ODS results off

Posted in reply to BruceBrad

Following Xia's pointer to Rick's blog, http://blogs.sas.com/content/iml/2013/05/24/turn-off-ods-for-simulations.html I think the best approach is:

ods graphics off;

ods exclude all;

ods noresults;

[procedure]

ods graphics on;

ods exclude none;

ods results;

This gives results that run almost as fast as in batch mode.

View solution in original post


All Replies
Contributor
Posts: 37

Re: Turning ODS results off

Posted in reply to BruceBrad

I haven't used ods graphics , I might be wrong. But , did you try ODS LISTING CLOSE; before your ods statements?

Super User
Posts: 10,044

Re: Turning ODS results off

Posted in reply to BruceBrad

ODS _ALL_ CLOSE;

SAS Super FREQ
Posts: 8,868

Re: Turning ODS results off

Posted in reply to BruceBrad

Hi:

  When you use PROC TPSPLINE, there is a documentation example that compares 2 different techniques for working with large data sets. That may help:

SAS/STAT(R) 13.1 User's Guide

  When you say that graphs are NOT showing, there are a variety of factors that can be impacting whether graphs are displayed or not. Do you have ODS GRAPHICS turned on? Do you have the right PLOTS= option? If ODS Graphics is enabled but you do not specify the PLOTS= option, then PROC TPSPLINE produces a default set of plots. But, whether or not you see those plots will depend on the destination you are using. Are you taking all the defaults for destination? Are you using Enterprise Guide or SAS for Windows or another interface to SAS? Depending on your destination, you may need to include explicit ODS controls in your ODS statement like PATH= or GPATH= to make sure that the graphic image gets written to the same location as the tabular output from the procedure. Or, switch to an destination like ODS PDF or ODS RTF where the images get embedded in the output file. With the default ODS HTML in SAS on Windows, for example, it is possible for the tables from the procedure to be written to one location and for the graph output to be written to another location.

     
  I used this code (from the example in the documentation), taking all the defaults,

data large;

   do x=-5 to 5 by 0.02;

      y=5*sin(3*x)+1*rannor(57391);

      output;

   end;

run;

ods graphics on;

  

ods pdf file='c:\temp\large_tps.pdf';

proc tpspline data=large;

   model y  =(x) /lognlambda=(-5 to -1 by 0.2) alpha=0.01;

   output out=fit1 pred lclm uclm;

run;

ods pdf close;

I do see both tables and graphs in the resulting PDF file (here is the first and last set of graphs in the output):

first_tps.png

tps_pix.png

cynthia

Frequent Contributor
Posts: 134

Re: Turning ODS results off

Posted in reply to Cynthia_sas

Cynthia, I'm trying to suppress all the output from TPSpline (because it slows my job down to a crawl when I have many by groups). I had managed to turn the graphics off, but could not turn off the listing output.  I actually have quite small datasets in the tpspline context, but many of them in by groups.

I tried 'ods listing close', but it didn't work. 'ods _all_ close' seems to work. But how do I turn output back on afterwards (eg for proc means listing)?

Frequent Contributor
Posts: 134

Re: Turning ODS results off

Posted in reply to BruceBrad

I've sorted it. The following works (but might be overkill)

ods graphics off;

ods results off;

ods _all_ close;

proc tpspline etc

ods results on;

ods listing ;

Super User
Posts: 10,044

Re: Turning ODS results off

Posted in reply to BruceBrad

Yes. That is overkill. Check this paper

http://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html

Rick strongly suggest not to use ODS _ALL_ CLOSE ;

Xia Keshan

Solution
‎05-26-2015 09:03 PM
Frequent Contributor
Posts: 134

Re: Turning ODS results off

Posted in reply to BruceBrad

Following Xia's pointer to Rick's blog, http://blogs.sas.com/content/iml/2013/05/24/turn-off-ods-for-simulations.html I think the best approach is:

ods graphics off;

ods exclude all;

ods noresults;

[procedure]

ods graphics on;

ods exclude none;

ods results;

This gives results that run almost as fast as in batch mode.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 4804 views
  • 6 likes
  • 4 in conversation