Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

automation

sas

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

like image 809
James Oliver Avatar asked Oct 19 '16 07:10

James Oliver


1 Answers

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!

like image 90
Allan Bowe Avatar answered Nov 13 '22 15:11

Allan Bowe