BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BruceBrad
Lapis Lazuli | Level 10

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.

1 ACCEPTED SOLUTION

Accepted Solutions
BruceBrad
Lapis Lazuli | Level 10

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

7 REPLIES 7
Karthikeyan
Fluorite | Level 6

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

Ksharp
Super User

ODS _ALL_ CLOSE;

Cynthia_sas
SAS Super FREQ

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

BruceBrad
Lapis Lazuli | Level 10

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)?

BruceBrad
Lapis Lazuli | Level 10

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 ;

Ksharp
Super User

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

BruceBrad
Lapis Lazuli | Level 10

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 27904 views
  • 8 likes
  • 4 in conversation