07-07-2014 07:48 PM
I'm wondering what tips and tricks for SAS interface customization (in 9.3 Enhanced Editor in Windows) folks might have. A little about me and what I already do... I'm a researcher so I'm not in SAS everyday, but when I am I want it to be efficient. I love keyboard shortcuts and macros. I try to think like a programmer when I analyze data. I only analyze with code if I can help it. I try to "macrotize" (but still not all the fluent), and I setup my .sas files as discrete program files (rather than one large file with all analyses) following J. Scott Long's guidelines. I run my code interactively (select and F3, but am experimenting with batch...it's just not second nature yet). I tend to use .lst output rather than ODS output as default. I don't have Enterprise Guide at work.
I've already found these SAS interface tweaks helpful.
1) Customize a high-contrast color scheme for EE with black background (still can't figure out how to do it for log and output).
2) Setup default libraries for my active projects.
3) Made tool icons larger
4) Customize window layout (though it would be great to have SAS start this way rather than having to arrange them each time)
5) I use the built-in kb shortcuts and have programmed kb macros that produce common data and proc steps.
Here are a few things I'd like to figure out how to do, but what other tips do you recommend. I thought about moving to a an external editor and running in batch. Haven't ruled it out, but I figured there may be some nice secrets to the SAS IDE that I haven't learned yet.
- I wish I could switch between program windows without having to cycle through all open windows (i.e. log, output).
- Is there a way to setup my code library in SAS that would make it easier to access than opening files, saving as (or copying/pasting) and would remove the need for kb macros for proc/data steps?
Thanks in advance, all!
07-08-2014 11:42 AM
In my SAS install default behavior of the F5 key is to cycle through open Enhanced Program Editor windows.
Without examples of the kb macros you're using I'm not sure what alternatives may exist. I suspect that %include may occasionally be what you need.
For 4) above after you get the layout the way you would like go to each window and issue a WSAVE command from the command box. This should save coordinates and any color settings. Note that this info goes into a profile in SASUSER and is only available to the first SAS session if you run multiples and may not get migrated when updating.
You may want to investigate the KEYS window and commands. You can associate, with some practice, many SAS commands such as opening the last data set created with user selected keystrokes, clearing the results, output and/or log windows
07-08-2014 06:58 PM
Thanks for the WSAVE tip. I've never really used that box in SAS until I started researching customization. Seems really helpful.
I do need to investigate KEYS more. Came across that, too. My KB macros right now are just things like code shells (e.g., types out all the standard, required, and prefered elements of a "proc freq" etc., so I can just go add the data file name, title details, and vars.). Sort of solves the "code library" issue, and is a little quicker that opening a file.
07-09-2014 10:30 AM
Possibly instead of keyboard macros you can take the code and make macros in your autocall library and then use an Editor Abbreviation to provide the macro call syntax where you provide parameters like dataset, title text and variable list.