SAS keyboard shortcuts that every analyst must know

Deepanshu Bhalla 10 Comments ,

If you fancy yourself a rockstar analyst, you know how valuable it is to keep your hands on the keyboard. Apart from making you work more efficiently and faster, you can also impress your friends or colleagues by being able to work without a mouse. Here is a list of SAS keyboard shortcuts that can make your life easy while working with SAS.

SAS Keyboard Shortcuts
SAS Keyboard Shortcuts

Important SAS Shortcuts for Productivity

The following is a list of productivity boosting SAS keyboard shortcuts. It would bring efficiency in writing SAS programming code.
Description Shortcut Key
Run or submit a program F3 or F8
Comment the selected code (/) Ctrl + /
Uncomment the selected code (/) Ctrl + Shift + /
Stop Processing or Cancel Submitted Statement Ctrl + Break
Convert selected text to upper case Ctrl + Shift + U
Convert selected text to lower case Ctrl + Shift + L
Find text Ctrl + F
Find and replace text Ctrl + H
Copy Selection Ctrl + C
Paste Ctrl + V
Cut Selection Ctrl + X
Go to a particular line Ctrl + G
To move curser to the matching DO/END statemen Alt + [ or Alt + ]
To move cursor to matching brace/parentheses Ctrl + [ or Ctrl + ]
Move to beginning of line Home
Move to top CTRL+Home
Move to end CTRL+End
To close the active window CTRL+F4
To exit the SAS system ALT+F4

Important Shortcuts for SAS Enterprise Guide

Description Shortcut Key
Ctrl+End Go to the last record, last column
Ctrl+Home Go to the first record, first column
Ctrl+G Go to specific row or column
Ctrl + right arrow Move to last column
Ctrl + left arrow Move to first column
F2 Rename dataset
Ctrl + I Format ugly code (Select the code and press Ctrl I)


Other Useful SAS Keyboard Shortcuts

Description Shortcut Key
Bring up word tip Alt + F1 + No Selection
Hide the current word tip Esc
Collapse all folding blocks Alt + Ctrl + Number pad -
Expand all folding blocks Alt + Ctrl + Number pad +
Execute the last recorded macro Ctrl + F1
Undo edit Ctrl + Z
Redo edit Ctrl + Y
Clear window Ctrl + E
Paste program below F4
Get Help for a SAS procedure Place the cursor within a procedure name and press F1
Context Help F1
Move cursor to next case change Alt + Right
Move cursor to previous case change Alt + Left
File window Ctrl + Q
Explorer window Ctrl + W
Titles window Ctrl + T
System options window Ctrl + I
Open file window Ctrl + O
Save as window Ctrl + S
Active libraries window Ctrl + D
Select all Ctrl + A
Clean up white space Ctrl + Shift + W
Comment the selection with line comments Ctrl + /
Undo the Comment Ctrl + Shift + /
Convert the selected text to lowercase Ctrl + Shift + L
Convert the selected text to uppercase Ctrl + Shift + U
Submit selected code F8
Log F6
Output F7
Editor F8
Keys F9
Next Window Ctrl + Tab
Tile Shift + F4
Cascade Shift + F5
Next window Ctrl + F6
How to create keyboard shortcuts in SAS
  1. Open the Enhanced Editor window within SAS.
  2. From the toolbar, select Tools --> Options --> Keys.
  3. Scroll down to the keystroke you would like to assign to the series of commands, looking for a keystroke that has no assignment.
  4. Add the command code under the definition heading. For example: log; clear; output;clear;
  5. Close the Keys window.
Related Posts
Spread the Word!
Share
About Author:
Deepanshu Bhalla

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 10 years of experience in data science. During his tenure, he worked with global clients in various domains like Banking, Insurance, Private Equity, Telecom and HR.

10 Responses to "SAS keyboard shortcuts that every analyst must know"
  1. Ctrl + / (German keyboard Strg + -) do not comment the selected code, the complete line will be commented and if I mark more than one line, each line will be commented separated. Do you/anyone have a solution for commenting only the selected code no mater of lines? Greetz PegasusTT77

    ReplyDelete
  2. What is the short cut to Move cursor to matching DO/END keyword.
    Thanks,
    Jeshwika,
    Technical Architect @ Catch Experts

    ReplyDelete
  3. How to refresh library in sas 9.4

    ReplyDelete
  4. Great article - thank you for putting this together!

    ReplyDelete
  5. Wonderful I av got only 30 minutes but its like i av been learning fr years

    ReplyDelete
  6. Found it very very useful, hence commenting again! Please add to it as if find necessary. It is one of the most important articles available on internet about keyboard shortcuts for SAS.

    ReplyDelete
Next → ← Prev