BookmarkSubscribeRSS Feed
hairlossmonkey
Calcite | Level 5

I feel like this should be a lot easier to do than it has been (for me, so far).

 

I want to select a code chunk, hit a function key (or any set of keys really) and have it clear the Log, clear the Results Viewer*, then run my code.

 

*Whether or not this key-combe clears the long Results list is irrelevant to me, but I don't want the Results window to pop-up annoyingly.

 

I have tried every combination on this page: https://communities.sas.com/t5/SAS-Procedures/Clearing-Results-Viewer-in-9-3/td-p/53232, but none of them work.

 

I can get the Log to clear and run my code, but can't get the Results Viewer to clear, just as though I was pressing Control-E with the Results Viewer as the front-most window.

 

Thanks!

6 REPLIES 6
SASKiwi
PROC Star

What SAS client are you talking about: Enterprise Guide, SAS Display Manager, or SAS Studio? The post you link to will only work for SAS Display Manager AKA full SAS installed on your PC.

hairlossmonkey
Calcite | Level 5

Good question; sorry. Yes, full SAS on within a virtual machine.

Reeza
Super User

And what output destination are you using, the default listing or HTML?

Tom
Super User Tom
Super User

This definition seems to work for me.

odsresults ; clear ; output ; clear ; log ; clear ; wpgm ; end
hairlossmonkey
Calcite | Level 5

Thanks for the response!

 

This combo opens main Results window, leaves it visible, opens the Output window, and moves my other windows around. I just want the log and Results View cleared and the code run.

 

I was able to piece together this code:

 

log; clear; odsresults; clear; odsresults; cancel; wpgm; submit;

 

which mostly works. There's lots of movement and flashing of windows, but everything ends up mostly in the same place it started.

 

Any improvement possble?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 3375 views
  • 0 likes
  • 4 in conversation