Help using Base SAS procedures

Clearing output in 9.4

Accepted Solution Solved
Reply
Super Contributor
Posts: 279
Accepted Solution

Clearing output in 9.4

I have about 20,000 records.  SAS 9.4  listing output seems to be creating an index for each TNumber and it takes forever to clear the output window.  This was not the case in 9.2. Is there a way to quickly clear the output window?

 

proc sort data=one;

by tnumber;

run;

proc print data=one;

by tnumber;

run;


Accepted Solutions
Solution
‎11-24-2015 02:02 PM
Trusted Advisor
Posts: 1,118

Re: Clearing output in 9.4

@GreggB: Thanks for pointing this out. I've just replicated the issue. It really takes very long, regardless of which method I use to clear the output window (Ctrl-N, Ctrl-E, menu, line command, button, via Results). The large number of BY groups causes the issue, not just the number of observations.

 

I was about to recommend PROC PRINTTO as a workaround, when I discovered the following trick:

  1. Close the Output window
  2. Delete the entry corresponding to the long output in the Results window
  3. Re-open the Output window (possibly the long output will still be there, strangely enough)
  4. Clear the Output window by any of the standard methods mentioned above

Does this work for you?

 

@PGStats: Thanks for mentioning Ctrl-N. I only knew Ctrl-E (from the good old KEYS window).

View solution in original post


All Replies
Respected Advisor
Posts: 4,930

Re: Clearing output in 9.4

Why would you want to write 20 000 records to the Output window? When I happen to send something to the Outout window by error, I use Ctrl-N to clear the window. 

PG
Super User
Posts: 19,859

Re: Clearing output in 9.4

Are you using HTML in 9.4 vs using Listing in 9.2?
You can change the settings in your options to implement a change permanently or use the code below to change for a specific project. You could also limit the listing to a specific amount using OBS=.
ODS HTML CLOSE;
ODS LISTING;
proc print data=one (OBS=100);
by tnumber;
run;
Solution
‎11-24-2015 02:02 PM
Trusted Advisor
Posts: 1,118

Re: Clearing output in 9.4

@GreggB: Thanks for pointing this out. I've just replicated the issue. It really takes very long, regardless of which method I use to clear the output window (Ctrl-N, Ctrl-E, menu, line command, button, via Results). The large number of BY groups causes the issue, not just the number of observations.

 

I was about to recommend PROC PRINTTO as a workaround, when I discovered the following trick:

  1. Close the Output window
  2. Delete the entry corresponding to the long output in the Results window
  3. Re-open the Output window (possibly the long output will still be there, strangely enough)
  4. Clear the Output window by any of the standard methods mentioned above

Does this work for you?

 

@PGStats: Thanks for mentioning Ctrl-N. I only knew Ctrl-E (from the good old KEYS window).

Super Contributor
Posts: 279

Re: Clearing output in 9.4

Posted in reply to FreelanceReinhard
Thanks!
🔒 This topic is solved and locked.

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

Discussion stats
  • 4 replies
  • 424 views
  • 0 likes
  • 4 in conversation