New Autocomplete Feature in the SAS Code Editor

About the Autocomplete Feature

The autocomplete, or code completion, feature in the code editor can predict the next word that you want to enter before you actually enter it completely. The autocomplete feature can complete keywords that are associated with SAS procedures, statements, macros, functions, CALL routines, formats, informats, macro variables, SAS colors, style elements, style attributes, and statistics keywords, and various SAS statement and procedure options.
This example shows the keywords and Help that appear when you enter proc a in the code editor.
Example of the Autocomplete Feature in the Code Editor
In this example, you select APPEND from the list of procedures, so that proc append appears in the code editor. When you enter a space, the code editor displays a list of options for the APPEND procedure.
Options That Are Available When You Select the APPEND Procedure

How to Use the Autocomplete Feature

To use the autocomplete feature:
  1. How you open the autocomplete list depends on the keyword that you want to add.
    • If you want to add a global statement, DATA step statement, CALL routine, procedure, macro statement, or automatic macro variable, enter the first one or more letters of the keyword that you want to use.
      A window opens with a list of suggested keywords that begin with those letters.
      Options That Appear When You Type
    • If you want to specify colors, formats, informats, macro functions, SAS functions, statistics keywords, style elements, or style attributes, press Ctrl+spacebar. To navigate through the list of options backward, press Ctrl+Shift+spacebar.
      Note: These shortcuts work even if you have deselected the Enable autocomplete option in the Preferences window. For more information, see Setting Preferences.
      Options in the Code Editor
  2. You can navigate to the keyword that you want to use in several ways:
    • Continue to type until the correct keyword is selected (because the matching improves as you type).
    • Scroll through the list by using the up and down arrow keys, the Page Up and Page Down keys, or your mouse.
  3. You can add the keyword to your program by double-clicking the selected keyword or pressing the Enter key.
Note: To view the Help for a keyword that is already in your code, place your mouse pointer over the keyword or right-click the keyword and select Syntax Help.

Adding Table Names and Column Names to Your SAS Code

From the Libraries section, you can use a drag-and-drop operation to move table names and column names into the SAS code. For example, you can move the Sashelp.Cars table into the DATA option for the PRINT procedure. When you release the mouse, the fully qualified name for the table appears in your code.
Completed PRINT Procedure