There is a SAS script I run often for quality assurance.
Often enough that I wanted to assign it a shortcut key.
I now have the first command in the test macro below in my autoexec.sas
.
I left the entire macro to make it easier for you
to adapt the script to your needs.
If you save the script as c:\tmp\testDMKEYS.sas
,
and run the first two commands in the macro
(e.g., by selecting them and pressing F3),
then when you press F12
the log message DM KEYDEF successful.
will appear.
%macro rem/des='helper for debugging DM KEYDEF';
/* This goes in your autoexec.sas: */
dm 'keydef F12 %NRSTR(%inc %"&_my_favorite_program%";)';
/* This too, although you can always change it later. */
%let _my_favorite_program=c:/tmp/testDMKEYS.sas;
/* Here are some useful debugging tools for quoting issues */
data foo; bar=1; run;
%inc "c:/tmp/testDMKEYS.sas";
/* escape from SAS open block, a.k.a. quote killer
%mend; quit; ;*';*";*/;
%mend;
%put DM KEYDEF successful.;
If you have any suggestions for simplifications please add them in the comments.