Upload
berniece-pitts
View
215
Download
0
Embed Size (px)
Citation preview
Copyright © 2006, SAS Institute Inc. All rights reserved.
Shortcuts- what you may not know that can save you time!Elizabeth CeranowskiSAS Student Programs Manager
Copyright © 2006, SAS Institute Inc. All rights reserved.
What?
Keys Command
Other Keystroke Shortcuts
Keyword Coloring
SAS Abbreviations
Keyboard Macros
Copyright © 2006, SAS Institute Inc. All rights reserved.
Setting “Keys”
Execute SAS Command(s) quickly
Can be customized
Are saved in your user profile so you don’t have to keep setting them.
Copyright © 2006, SAS Institute Inc. All rights reserved.
Setting “Keys”
Example:
Prior to submitting code, I like a clean log and output window.
I want to set one “hot” key so that • “Clear log” is executed
• “Clear output” is executed.
Copyright © 2006, SAS Institute Inc. All rights reserved.
Setting “Keys”
Copyright © 2006, SAS Institute Inc. All rights reserved.
Setting “Keys”
I set F12 so that • “Clear log” is executed
• “Clear output” is executed
Notice, commands are separated by a semi-colon.
Copyright © 2006, SAS Institute Inc. All rights reserved.
Other Shortcuts Quickly comment code
Ctrl /
Quickly uncomment code
Ctrl Shift /
Copyright © 2006, SAS Institute Inc. All rights reserved.
Other Shortcuts
Got DO/END problems?
Copyright © 2006, SAS Institute Inc. All rights reserved.
Other Shortcuts
Where is it?
Copyright © 2006, SAS Institute Inc. All rights reserved.
Other Shortcuts
To locate matching pairs of DO/END statements:
ALT [
ALT ]
Copyright © 2006, SAS Institute Inc. All rights reserved.
Other Shortcuts
Need to change the case your code? Don’t retype it!
Change to Lowercase: Ctrl Shift L
Change to Uppercase: Ctrl Shift U
Copyright © 2006, SAS Institute Inc. All rights reserved.
SAS abbreviations are your friends, use the template method to code! Elizabeth CeranowskiSAS Student Programs Manager
Copyright © 2006, SAS Institute Inc. All rights reserved.
What is an abbreviation?
Text that will be injected into your Enhanced Editor Window when established key strokes are issued.
Copyright © 2006, SAS Institute Inc. All rights reserved.
When is this useful?
Adding comment blocks
Getting code hints− Great for functions and procedures!
Performing repetitive coding… Reduce Typing!
Copyright © 2006, SAS Institute Inc. All rights reserved.
PROC FREQ…
What statement selects Columns?
VAR?
COLUMN?
TABLES?
What are the arguments to that “function”?
I have to COMMENT
my program EVERY
time!
I use PROC PRINT all the time! I am TIRED of typing!
Copyright © 2006, SAS Institute Inc. All rights reserved.
Need to use TRANWRD function. Misspelled the word “received”!
Note: This data is entirely fictitious. All names and complaints are made up!
Copyright © 2006, SAS Institute Inc. All rights reserved.
The Steps…
1. Write the code or text that SAS should inject.
2. Choose a name for the abbreviation.
3. Highlight and copy the text.
4. Create the abbreviation.
Copyright © 2006, SAS Institute Inc. All rights reserved.
I need help!
SYNTAX:
tranwrd( <variable>,
<What is there now>,
<What to replace with>)
Copyright © 2006, SAS Institute Inc. All rights reserved.
Can you set a Shortcut Key?
Absolutely!
Just modify the abbreviation, and “assign keys”.
Copyright © 2006, SAS Institute Inc. All rights reserved.
Keyboard Macros
SAS has many assigned Keyboard Macros already included.
That Lowcase and Upcase short cut is actually a Keyboard Macro.
Copyright © 2006, SAS Institute Inc. All rights reserved.Copyright © 2006, SAS Institute Inc. All rights reserved.
Thank You!