How we love shortcuts. Our life seems more efficient with them. I try to take the earlier train for a good parking spot that lets me exit early. Actually change that to any spot (my train station has tons of commuters with FEW parking spaces so getting up early is the only choice). But some of these shortcuts come at a cost. Remind me to tell you all about this Natural Law that SAS also respects in a future post.
Don’t we all try to recreate our world with a bare minimum of manual work? Our perfect world would have machines do all our bidding and our repetitive manual work leaving us completely free to dream up better and faster technology and solutions. While you revel and enjoy this dream for a few seconds, allow me to bring you gently back to reality with three practical tips to help you do just that. I use these, time and over again to help manage my SAS display manager session.
Shortcut #1 - Check the log first
You’re probably familiar with the theme song you’ve heard in a SAS training class “Always check the log first.” Well, isn’t it possible to let SAS make the log its window of first choice instead of hitting all those keystrokes to get to the log? Absolutely! Here’s what you do:
- Make the log window your active window.
- Type this code into your command window and hit enter.
Autopop on; wsave;
Now run a SAS program, any SAS program. See how it takes you directly to the log without you having to activate the log window?
Shortcut #2 - Clear log, output & submit code in one keystroke
Fast on the heels of my last tip is the question that’s probably on the tip of your tongue: But the log is a chronological log, sometimes I want to see my entire log history. Other times I just want to see the most recent log and output. How? With these steps:
- Activate your function keys by typing Keys in your command window.
- Find a function that hasn't been programmed yet. I'll pick F12.
- Type in this command:
Clear Log; Clear Output; Submit;
Now run any program by hitting the F12 key or whichever key you used as your shortcut for this tip. See how it automatically clears your log, output windows and submits your SAS program all in one masterful keystroke! Needless to say you don’t have to use this programmed key when you want to see the log and output accumulated.
Shortcut #3 - Automatically assign libraries at startup
Library assignments can be a drag sometimes. All you want is for your libraries to be automatically assigned in your session. Can you let SAS do this? Sure, here’s how (FYI, I’m suggesting an interactive method here but if you prefer writing code, you can certainly embed multiple Libname statements in your programs to assign them at startup or even include them in your autoexec.sas program file).
- Click on the New Library icon.
- Enter the library name and path.
- Check Enable at startup.
Next time you open your SAS session, you’ll see the ORIN library is automatically assigned without any manual interference.
Hope you found these tips useful. I always share them with students who take my SAS programming classes. I’m sure you have many more that you use. I’d love to hear your tips and also what you’d like to read about in my blog posts. Do you like them short or long? Looking forward to your ideas.