5

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

James Oliver
  • 547
  • 1
  • 4
  • 17
  • As a side note, this is probably the #2 reason I like using enterprise guide as a programmer: the ease of viewing datasets you just ran. – Joe Oct 19 '16 at 15:44
  • It's why I prefer using R, but apparently a multibillion euro company doesn't want to do exactly what I want :). I have Enterprise guide but with a different setup. The team all use base, and we use rsubmit which would mean our code being potentially incompatible... – James Oliver Oct 20 '16 at 09:53
  • Hmm, EG should work with rsubmit just fine (via localserver)... – Joe Oct 20 '16 at 14:17

1 Answers1

5

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!

Community
  • 1
  • 1
Allan Bowe
  • 12,306
  • 19
  • 75
  • 124
  • Thanks for the detailed examples. – James Oliver Oct 20 '16 at 09:48
  • Always forget I can't enter in comments. For the explorer it seems I need to click into the explorer to make this happen, its still quicker but I'm wondering if I can do it without that. Also on the last data set, that's also cool but as I'm using rsubmit, it opens the last work file not rwork. How would I adapt your code to get that? Really appreciate these secrets – James Oliver Oct 20 '16 at 09:51
  • Try: `dm 'keydef F4 "submit ''rsubmit; %nrstr(%sysrput lastDS=&syslast;) endrsubmit;''; vt rwork.%scan(&lastDS,2,.)"'; ` – Allan Bowe Oct 20 '16 at 10:12
  • hmm - works for me. If you can ask a new question with this particular issue (screenshots would help) happy to take a look! – Allan Bowe Oct 20 '16 at 11:22
  • Thanks @RawFocus - I've created a new question [here](http://stackoverflow.com/questions/40153344/sas-how-to-open-most-recent-file-when-using-remote-connection) – James Oliver Oct 20 '16 at 11:39