Turning off all output in large simulation jobs

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

Turning off all output in large simulation jobs

I frequently write SAS macros that call SAS procedures thousands of times.  I would like to prevent any output from being created other than ODS outputs that I request from the procedures.  However, some procedures like SurveyReg seem to send copious output to the lisitng file or the HTML destination no matter what I try.  It is particularly annoying in interactive mode.  Is there any way to prevent the results window from being populated? 


Accepted Solutions
Solution
‎07-12-2012 03:47 PM
Super User
Posts: 17,868

Re: Turning off all output in large simulation jobs

ods noresults;

What does that do?

View solution in original post


All Replies
N/A
Posts: 1

Re: Turning off all output in large simulation jobs


I work with SAS EG. I use proc printto to save log output into specified location. I hope it can be used also for output.

proc printto log='Path of the file' new;

run;

The keyword NEW will update the file every time you run the code.

To cancel this:

proc printto;

run;

Hope it will help.

Super User
Posts: 17,868

Re: Turning off all output in large simulation jobs

You can close the listing destination, ie

ods listing close; *to turn off output;

ods html close;

ods html;

ods listing; *to turn on;

And you can use proc printto to redirect the log.

Occasional Contributor
Posts: 15

Re: Turning off all output in large simulation jobs

Thanks, but neither "ods listing close" nor "ods html close" prevent the results windw from filling up.  Also, Proc printto just sends things somewhere else.  I want it all to disappear without a trace into the ether. 

Super User
Posts: 17,868

Re: Turning off all output in large simulation jobs

What results window are you referring to? And what version of SAS and output destination are you using?

Turning on ods listing close; is supposed to make all the results disappear into the ether.

ods listing close;

proc print data=sashelp.class;

run;

You shouldn't have anything go to any output destination then. If it still is, post a sample of the code you're using to see where the error might be.

Occasional Contributor
Posts: 15

Re: Turning off all output in large simulation jobs

In interactive mode of SAS (both 9.2 and 9.3) there is a "Results" window that holds a bookmark for every output data set created by every proc.  When running a simulation job, the number of bookmarks can be very large. 

Super User
Posts: 17,868

Re: Turning off all output in large simulation jobs

Then ods listing close will definitely work.

So there's something else in your code that is causing issues which I can't tell without seeing the code.

When you run the code below do you get the entry in the result tab and in the listing or html output?

ods _all_ close;

title 'is this in my result window?';

proc print data=sashelp.class;

run;

ods listing;

Occasional Contributor
Posts: 15

Re: Turning off all output in large simulation jobs

Well, the command is successful in preventing a simple proc print output from appearing in the results window, but when I use the following code insided an iteracted do loop with 2000 replications, I get 4000 bookmarks in the results window even after applying ods listing close (interactive mode).  There are 2000 bookmarks for "estimates" and 2000 for "joint."

proc surveyreg data=mydata;

  cluster mycluster;

  class treatment outcome;

  model myvar=treatment*outcome/solution;

  weight myweight;

  estimate

    'tvalue1'  treatment*outcome -1 0 1 0,

    'tvalue2' treatment*outcome 0 -1 0 1/

    joint (label="mylabel");

  ods ouput estimates=estimates contrasts=joint;

run:

Super User
Posts: 17,868

Re: Turning off all output in large simulation jobs

The bookmarks hold only the SAS dataset created though, correct?

I don't know a way around that.

You shouldn't have any output in an output window.

Occasional Contributor
Posts: 15

Re: Turning off all output in large simulation jobs

Correct.  Exactly.  I have not been able to find a way around it either. Frustrating since filling the results window with all those bookmarks or clearing them all out again does take a noticeable lag of time.  

Solution
‎07-12-2012 03:47 PM
Super User
Posts: 17,868

Re: Turning off all output in large simulation jobs

ods noresults;

What does that do?

Occasional Contributor
Posts: 15

Re: Turning off all output in large simulation jobs

Eureka!  Thanks.  That does it alright.

☑ This topic is SOLVED.

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

Discussion stats
  • 11 replies
  • 404 views
  • 2 likes
  • 3 in conversation