The new default output destination in SAS 9.3 is the "Results Viewer" rather than the "Listing" window. The results viewer shows an html file that integrates text and graphical output. It's pretty, and it's very nice (sometimes) to see graphics with some other relevant output.
However, long-time SAS users may feel somewhat at a loss if they try to clear the results viewer window the way they used to clear the listing. The "Clear/New" button on the toolbar is grayed out!
SAS has a usage note about this-- there must be many people who, like me, end up with hundreds or thousands of pages in the results viewer. They suggest using
ods html newfile=proc;
Unfortunately, the usage note is too draconian-- it generates new results windows with every proc! Now I have a proliferation of files, and can't find old output easily.
Rick Wicklin suggests closing the output file and opening a new one with
ods html close; ods html;
That works OK, but it's a lot of typing to replace what used to be a mouse click.
The gsubmit command allows you to submit SAS code from a function key or toolbar.
A. Function key
- Open the KEYS window by typing keys in the command bar (that white space to the left of the icons).
- In any empty space, type: gsubmit "ods html close; ods html;"
The key will now shut the current results file and open a new one. Note that the old results don't disappear until you generate some more output. In addition, I believe the old output file (sashtml#.htm) still exists somewhere, if you kill something by mistake that you need back. Its location is probably buring somewhere in the defaults.
B. Toolbar button
- With the results viewer window in focus, right-click in the toolbar. Or click Tools > Customize.
- Click on the "Add tool" button (leftmost after the divider)
- For the command, type: gsubmit "ods html close; ods html;"
- Add help text and tip text (rollover) if you like
- Choose an icon for the new tool with the "Change icon" button (third one). There's a pencil erasing about 35% of the way through the options-- my choice.
- Use the up and down arrows to move the new tool to where you want it to be.
- Click OK and then Yes to save permanently.
As with the function key method, your new button will shut the current results file and open a new one. And the other observations are true here as well.