Change Default Behavior for "Window is Full" Message

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

Change Default Behavior for "Window is Full" Message

I find it very annoying that SAS sits and waits for me to make a decision when the output window fills up.  Is there any way to force it to purge the window by default?  If not, why not?


Accepted Solutions
Solution
‎11-01-2013 03:46 PM
Trusted Advisor
Posts: 1,500

Re: Change Default Behavior for "Window is Full" Message

Basically, I'm asking to have the radio button on the popup window default to "clear output window" and bypass the part where it asks for user approval.

I don't think this feature exists. This is specifically why PROC PRINTTO was created, so you can control what output goes where, and if PROC PRINTTO doesn't meet your needs, then I think you're stuck. (Still not sure why you can't use the file that is created by PROC PRINTTO, why you must have things in the OUTPUT window...)

However, let's look at this from another angle. Your problem is that you forget and instead of

proc print data = dataset(obs=10);

you create code that says

proc print data = dataset;

and now you have the problem of way too much being sent to the OUTPUT window.

I got out of the habit of using PROC PRINT to help me see my datasets many many many years ago, as there are, in my opinion, much much better options that lets you view your datasets (in their entirety, not just 10 observations) without writing a single piece of information to the output window. SAS provides you with the Explorer window (if its not open by default, use View->Explorer) and from there you can double-click on any data set that has been created by your program and see what is in it. Works great for me. I never use PROC PRINT for the purpose of letting me see intermediate datasets. And if you do it this way, it sounds to me like your problem is solved.

View solution in original post


All Replies
Trusted Advisor
Posts: 1,500

Re: Change Default Behavior for "Window is Full" Message

PROC PRINTTO can send Output and/or Log to a file, and you won't have this problem.

Contributor
Posts: 24

Re: Change Default Behavior for "Window is Full" Message

But then *all* of the output is directed to said file, which isn't what I want.  What I want is for the output to be directed to the output window like normal, but when the output gets full, SAS to automatically select "clear window" instead of waiting for me to select "clear window"

Trusted Advisor
Posts: 1,500

Re: Change Default Behavior for "Window is Full" Message

You could then delete the file created, or use something like

filename nofile dummy;

proc printto print=nofile; run;

and then no file is produced.

But you could also use ods listing close; at the start of your program and then nothing is written to the output window.

Regular Contributor
Posts: 244

Re: Change Default Behavior for "Window is Full" Message

Your request doesn't make much sense from a UI perspective.  How is SAS supposed to know that you care about some output and don't care about other output?  Either ODS LISTING CLOSE or PROC PRINTTO make the output go somewhere else and fulfill your need; or even use ODS HTML instead of ODS LISTING and then there is no (reasonably achievable) maximum.

Alternately, if you're doing something like generating a thousand reports and just like having the last one on the screen so you can verify it works, you can put an

  dm 'output; clear;';

at the start of your reporting macro.  Then you'd have one report (or one set of reports or whatever) visible on the screen, and the others would be cleared.

Contributor
Posts: 24

Re: Change Default Behavior for "Window is Full" Message

Perhaps I didn't make myself clear.  In my general mode of operation, I'll do things like proc print data = dataset(obs=10); or proc freq data=dataset(where account = " " ); table account; and the SAS output prints to the output window and everything is copacetic.  Sometimes, however, I forget to limit the procedures I'm using and suddenly tens or hundreds of millions of lines of data come pouring forth onto my screen.  When this situation occurs, a little window pops up with "output window full" in the title bar, and it gives four radio buttons from which to choose.  I could choose "save to file" (which is the current default), but since I'm not really interested in what has happened,  I choose the "clear output window" radio button.  Then I click "ok", and more output comes out, and I repeat the procedure.  Sometimes, if I know (or if I guess) I'll only have to click four or five times, I center my mouse over the little "x" in the popup window and start clicking while I read an article on a website.  Other times, when I realize that I will have to click hundreds or thousands of times to clear all the output, I open a new PC SAS session, find the location of the temporary directory, copy my temporary files to the new temporary directory, then close the offending PC SAS session.  I don't like either of these options.  What I would like is instead of having the window pop up and asking what to do, that there be an option to have it automatically select "clear output window" rather than asking the user what to do.  Basically, I'm asking to have the radio button on the popup window default to "clear output window" and bypass the part where it asks for user approval.  I assumed that this was (or could be) an option that lives under a toolbar such as "Tools" and could be selected at the user's convenience, or even (can't believe I'm using Windows as an example of a desired behavior) like the Windows popup that appears when the user has tried to open a file of a type that Windows doesn't yet have an association; it says "choose a program to open this file" and then has a check box that says "use this option from now on."  I suppose one could think of it like customizing the user's experience.  So, when I say "default", what I mean is the user's default, not the fresh-installation default.

Regular Contributor
Posts: 244

Re: Change Default Behavior for "Window is Full" Message

The problem is, how does SAS know whether you want it cleared or not?  Sure, it would be nice if the menu that asked you right then had a 'clear and keep clearing', but it doesn't; any option in the Tools/System Options menu would be global, and that's not something that would make sense.  SAS can't tell the difference between an intentional proc print with all vars, and an accidental one.

The best option is to stop using LISTING and move to using HTML output for all of your printed-to-the-screen output.  It looks nicer, and doesn't have a line or page limit that is reasonably findable.  If you are in 9.3 or newer, that's the default; in 9.2 you can modify the default in Preferences -> Results -> Uncheck Create Listing, Check Create HTML.

Contributor
Posts: 24

Re: Change Default Behavior for "Window is Full" Message

I don't know why I feel like arguing this point, but you seem to suggest that what I want is a bad idea, as if I want SAS to read my mind and sometimes print to the output window and sometimes not.  What I want is for SAS to always print to the output window, no matter how many boneheaded commands I issue.  In the instance where I make a mistake and print the entire data set, I want SAS to clean it up for me (but fully realizing that I have to pay the penalty of losing possibly useful output information printed earlier; I'm not asking for the world.)  In my current situation I have to blow away the entire PC SAS session (temp data sets, formats, etc.) which I don't enjoy.  I fully realize that a large part of my problem is that I operate with a connection to a remote server (and thus a remote connection to unix sas) and can't interrupt a command that I sent to the server until that command has finished (without irreparably interrupting my remote connect.)   Maybe that will be my next question.

Regular Contributor
Posts: 244

Re: Change Default Behavior for "Window is Full" Message

The problem is, some people want it to prompt them each time - they want to review each set of pages as they come out.  SAS can't know for sure which you want; so unless there were an option with every submit to override (which is not unreasonable, but is rather low on the list of 'things I'd like SAS to change' given the many other UI issues that could be addressed), it can't be a global setting.  Unless you move to ODS HTML, again, which would be really SAS's suggestion I'd guess (hence 9.3 moving to it) and getting rid of that limitation.

Solution
‎11-01-2013 03:46 PM
Trusted Advisor
Posts: 1,500

Re: Change Default Behavior for "Window is Full" Message

Basically, I'm asking to have the radio button on the popup window default to "clear output window" and bypass the part where it asks for user approval.

I don't think this feature exists. This is specifically why PROC PRINTTO was created, so you can control what output goes where, and if PROC PRINTTO doesn't meet your needs, then I think you're stuck. (Still not sure why you can't use the file that is created by PROC PRINTTO, why you must have things in the OUTPUT window...)

However, let's look at this from another angle. Your problem is that you forget and instead of

proc print data = dataset(obs=10);

you create code that says

proc print data = dataset;

and now you have the problem of way too much being sent to the OUTPUT window.

I got out of the habit of using PROC PRINT to help me see my datasets many many many years ago, as there are, in my opinion, much much better options that lets you view your datasets (in their entirety, not just 10 observations) without writing a single piece of information to the output window. SAS provides you with the Explorer window (if its not open by default, use View->Explorer) and from there you can double-click on any data set that has been created by your program and see what is in it. Works great for me. I never use PROC PRINT for the purpose of letting me see intermediate datasets. And if you do it this way, it sounds to me like your problem is solved.

Contributor
Posts: 24

Re: Change Default Behavior for "Window is Full" Message

So, it sounds like the answer to my question is "no".  I'm depressed, but not surprised.  Thanks for trying PaigeMiller and Snoopy369!

Trusted Advisor
Posts: 1,500

Re: Change Default Behavior for "Window is Full" Message

And do you have an objection to the advice in my last paragraph?

Contributor
Posts: 24

Re: Change Default Behavior for "Window is Full" Message

I don't like the explorer, though I use it on occasion.  I don't like how wide the variable names are, and the data environment in which I operate has data sets with hundreds of columns.  At any rate, my original question was "Is there any way to force it (SAS) to purge the (output) window by default?"  and your advice, while much appreciated, doesn't answer the question.

Super User
Super User
Posts: 6,364

Re: Change Default Behavior for "Window is Full" Message

What I would prefer is that they add a button that says stop the stupid proc that is filling up the output window.

Have you tried clearing it and hitting the interrupt key and cancelling the running proc before it fills up the window?

Also try using proc fsbrowse instead of proc print when you just want to look at the data.

data want ;

set sashelp.class;

run;

proc fsbrowse;

run;

Valued Guide
Posts: 2,174

Re: Change Default Behavior for "Window is Full" Message

Tom

have you ever re-used that code in batch without removing the proc fsbrowse?

If the original concern is to avoid dumping large data into the output window, why not set a default OBS= to a small number?

option obs = 1000 ;

For those occasions when larger volume must be handled it is simple to override with the data set option

  proc sql outobs= 1000 ;

  select ........

      from ............dataset( obs=max)

data bigfile( obs=max) ;

set .....data( obs=max) ;

proc print ;

run ;

☑ This topic is SOLVED.

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

Discussion stats
  • 18 replies
  • 2507 views
  • 3 likes
  • 8 in conversation