问题
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
回答1:
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!
来源:https://stackoverflow.com/questions/40124932/in-base-sas-how-can-i-auto-refresh-the-explorer