KEYBOARD SHORTCUTS FOR SAS
The Enhanced Editor in SAS allows you to save a series of keystrokes as keyboard macros. A special form of these macros is keyboard abbreviation. The abbreviation allows you to recall stored code with a minimum of keystrokes. In the example that follows, these keystrokes form the outline of a header section of comments for a SAS program.
BUILDING AN ABBREVIATION
By using an abbreviation, we will only need to type this code once. E.g. the following comment is to be
Project : The project name
Program : 01_client_name_project_purpose.sas
Version : Version Number
Purpose : Brief description of the code and its purpose
Author : Name of the author
Date : Date of creation of the code
Sub Macros : Names of macros if used
Reviewer : Name of the reviewer
Notes : Any notes or remarks about the code
To add this header as an abbreviation, select the pull down menus Tools and Add Abbreviation.
The Add Abbreviation dialog box is then displayed (see below). In the first dialog space, enter a name for the new abbreviation. This becomes a keyboard macro, so you must select a name that has not already been used. Then type (or more practically paste) the substitution text into the ‘Text to insert for abbreviation’ dialog space and press Ok.
USING THE ABBREVIATION
Whenever you want to use an abbreviation, simply type in the name of the abbreviation while in the Enhanced Editor. As soon as the last letter of the abbreviation has been entered, a small pop-up ‘tip’ text box containing the first few digits of the abbreviation is displayed. If at that point you press the TAB key the name of the abbreviation will be replaced by the text that you stored.
The following screen shot shows that the name of the HEADER abbreviation has been entered in the Enhanced Editor and the first few characters of the text to be substituted is shown in the pop-up ‘tip’ box.
As soon as you press the TAB key the abbreviation name is replaced by the stored text.
PEOPLE WHO READ THIS ALSO READ : SAS, SAS keyboard Shortcuts, SAS Macros, SAS Shortcuts
This entry was posted on Feb 19, 2011 at 8:38 PM and is filed under SAS, SAS keyboard Shortcuts, SAS Macros, SAS Shortcuts. You can follow any responses to this entry through the RSS 2.0. You can leave a response.