0

This is an extension from this question In Base SAS, how can I auto refresh the explorer?

RawFocus gives me a way of opening a file but it doesn't work for me as I'm using rsubmit. The updated code initially didn't work, but now it opens the wrong file. v3 rather v7. As per this pic.
Screenshot

The code I've used for the hotkey is as follows;

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

Any questions, please let me know,
J

Community
  • 1
  • 1
James Oliver
  • 547
  • 1
  • 4
  • 17

1 Answers1

1

Had to split across two keys, but the following may suit your needs:

dm 'keydef F3 "submit ''%nrstr(rsubmit; %sysrput lastds=&syslast; endrsubmit;)''; "';
dm 'keydef F4 "vt r%nrstr(&lastds); "';

Hit F3 to refresh, then F4 to open the table. This will only work though if the latest table is in RWORK! Am sure this could be improved with the use of macro..

Allan Bowe
  • 12,306
  • 19
  • 75
  • 124
  • Really appreciate you trying to solve this but its still not working. Now gives me example7 that I made hours for this example. The most recent thing is something else entirely. Is it possible that there is some kind of odd cache thing going on (as a totallly random guess) – James Oliver Oct 20 '16 at 15:15
  • can you try in a new session? I got similarly weird results when I was trying to build it! – Allan Bowe Oct 20 '16 at 15:39
  • 1
    Yep. Totally right. New session and it works. Very cool. Thanks. – James Oliver Oct 21 '16 at 07:27