I ran across a really nice macro I'd like to use as a hotkey:
%macro closevts / cmd;
%local i;
%do i=1 %to 20;
next "viewtable:"; end;
%end;
%mend;
dm "keydef F12 '%NRSTR(%closevts);"; /*Sets F12 to close all view tables at once*/
(Source: https://stackoverflow.com/a/3254004/110797)
The problem is that I have to rerun the macro declaration everytime I start SAS! The above code doesn't permanently set the keybinding, but I figured that part out (just go in Keys (F9) and manually set F12 to %closevts, then save it as permanent when you close the keys window). How can I permanently set the macro definition too?
I looked using sas profiles, but I haven't been able to figure it out. Plus my system is rather locked down, so multiple solutions are appreciated in case some don't work.