As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
One of the things that I've been waiting to see shipped as part of the SAS installation files is a collection of Abbreviations/Macros. I've always found abbreviations/macros to be the easiest and quickest way to include a procedure within one's code, as well as accomplish tasks and provide functionality that I thought were only available with some third-party editors.
The purpose of this page is to serve as a library of kmf files, and related code and papers, to help everyone import useful tools into their own SAS Abbreviations/Macro directory. Please add any that you have, or create, so that this page will eventually include every proc and as many useful utilities as possible.
Note that you can only have 400 macro/abbreviations on your SAS system, so choose wisely and bother whomever you can at SAS to eliminate this limitation (or at least make it more reasonable)!
Some of the macro/abbreviations follow the method described by Paul Grant in the paper referenced at the bottom of this page. In that paper, Paul explains how to set four underscores as a user defined keyword and change the Enhanced Editor's display of user defined keywords so that they appear with a Fuchsia background and black text.
Abbreviations can also be created and used in EG. See the Chris Hemedinger's blog post at the bottom of this page.
Also, how one names their macro/abbreviations can improve their utility. My own preference is to limit the names to four characters, in order to reduce keystrokes. Thus when I type impx on an Enhanced Editor screen, the macro/abbreviation for importing an xls file appears in a white box on my screen. If I then press the tab key, all of the options for using proc import with the XLS engine are automatically typed for me.
Please place any new entries, in alphabetical order, within their appropriate category.
- Call Routines
- File:Freq.kmf Proc Freq
- File:Impd.kmf Import a Delimited File
- File:Impe.kmf Import an Excel File
- File:Impt.kmf Import a Tab-Delimited File
- File:Impx.kmf Import an XLS File
- File:CLUP.kmf Remove blank lines from Enhanced Editor
- File:FDATA.kmf Find datasteps in Enhanced Editor (starting with last one and searching backwards). The user who submitted this kmf actually has it named _Select Datastep.kmf on his system and has it assigned to Shift+F3. That way, he can select Shift+F3 to find a datastep, followed by F3 to run the datastep.
- File:Header.kmf Add a consistent header to each program. Inserts the current date/time and programmer information. Edit to customize for your programming environment.
- Entire Collections
- Russ Lavery's Collection Context Sensitive help through the SAS Windows Editor Using Abbreviations for Easier SAS Coding
- File:2016 09 10 WUSS 5Macro skills in 7 examples.kmf Read the above link for instructions on the use of this collection of abbreviations.
- Menu Modifications
Information Sources for Creating Macro Abbreviations
- Quick article on the creation of Editor Abbreviations.
- Elizabeth Ceranowski SAS Abbreviations are your friends, use the template method to code!
- Art Carpenter, Creating Display Manager Abbreviations and Keyboard Macros for the Enhanced Editor
- Paul Grant Creating Code Templates in the SAS® Enhanced Editor using Abbreviations and User Defined Keywords
- SAS Usage Notes SAS® Enhanced Editor keyboard macros and abbreviations can be exported from SAS software and imported into SAS on another machine
- Arthur Tabachneck Tips:Saving some or all of your keyboard macros/abbreviations in one step
- Rick Wicklen Define abbreviations in the SAS enhanced editor on The Do Loop Blog
- Chris Hemedinger Take SAS program editor abbreviations to the next level on The SAS Dummy Blog
- Christopher J. Bost, Edit the Editor: Creating Keyboard Macros in SAS® Enterprise Guide®
- Base SAS: SAS Abbreviations