Clear the results viewer in SAS 9.4?

22.5k views Asked by At

When I searched, all the results came up for SAS 9.3. That suggested I use the commands:

ods html close; *STOPS WRITING TO THE CURRENT RESULTS VIEWER;

ods html; *OPENS A NEW RESULTS VIEWER;

I'm running SAS 9.4 (Base SAS) and this doesn't work for me, which leads me to the conclusion that the way to clear the results viewer has changed from SAS 9.3 to SAS 9.4.

What to do?

2

There are 2 answers

1
Allan Bowe On BEST ANSWER

I believe you need to run the following:

dm 'odsresults; clear';

or just type odsresults;clear in the SAS command box. This works for me in 9.3, can't see why it would be different in 9.4.

For further info - http://support.sas.com/kb/4/159.html

0
Chris Long On

If you're in Enterprise Guide, the default results viewer corresponds to the ODS destination 'SASREPORT', so closing and re-opening the HTML destination won't do what you're expecting. Look at the very top of your log in EG, and find the ODS statement that is automatically included there. You can do an ODS _ALL_ CLOSE; later in your program, and then copy-paste that ODS statement from the top of your log... that should then effectively throw away whatever output was generated up the that point, and you'll only see whatever came after you re-opened the SASREPORT destination.

If this works, you will probably then want to examine the copy-pasted ODS statement and remove any unnecessary options etc.

EDIT: after reading your follow-ups, and still assuming that you're in EG ('Base SAS' is just a language and doesn't have a results viewer of its own) then go to Tools -> Options -> Results General and update your Replace Results setting to either 'prompt without replacing' or 'prompt before replacing'.