In Base SAS, how can I auto refresh the explorer?

automation, sas

Solution

You could do this programmatically using:

dm "next explorer; refresh";

Or assign it to a shortcut key (eg F2) as follows:

dm "keydef F2 'next explorer; refresh'";

If you just want to open the last dataset, you could also assign this to a shortcut key:

dm "keydef F3 'vt &syslast'"; 

If the dataset is in a remote location, the following could be adapted for your needs (note the embedded sas code which gets submitted):

dm 'keydef F4 "submit ''rsubmit; %nrstr(%sysrput lastDS=&syslast;) endrsubmit;''; vt rwork.%scan(&lastDS,2,.)"'; 

More shortcuts available here!

Problem

I'm fairly sure this must be something that has bugged others and so there must be a solution. I write my code and want to quickly check the dataset, but it isn't there. I need to select the window, click View and click refresh. Is there a keyboard shortcut I can use or a macro I can write that does this for me? I know this is lazy but it bugs me. Any thoughts are appreciated. J

Original source

Related problems