21
Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs Manager

Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Embed Size (px)

Citation preview

Page 1: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Shortcuts- what you may not know that can save you time!Elizabeth CeranowskiSAS Student Programs Manager

Page 2: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

What?

Keys Command

Other Keystroke Shortcuts

Keyword Coloring

SAS Abbreviations

Keyboard Macros

Page 3: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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.

Page 4: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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.

Page 5: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Setting “Keys”

Page 6: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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.

Page 7: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Other Shortcuts Quickly comment code

Ctrl /

Quickly uncomment code

Ctrl Shift /

Page 8: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Other Shortcuts

Got DO/END problems?

Page 9: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Other Shortcuts

Where is it?

Page 10: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Other Shortcuts

To locate matching pairs of DO/END statements:

ALT [

ALT ]

Page 11: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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

Page 12: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

SAS abbreviations are your friends, use the template method to code! Elizabeth CeranowskiSAS Student Programs Manager

Page 13: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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.

Page 14: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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!

Page 15: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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!

Page 16: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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!

Page 17: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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.

Page 18: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

I need help!

SYNTAX:

tranwrd( <variable>,

<What is there now>,

<What to replace with>)

Page 19: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.

Can you set a Shortcut Key?

Absolutely!

Just modify the abbreviation, and “assign keys”.

Page 20: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

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.

Page 21: Copyright © 2006, SAS Institute Inc. All rights reserved. Shortcuts- what you may not know that can save you time! Elizabeth Ceranowski SAS Student Programs

Copyright © 2006, SAS Institute Inc. All rights reserved.Copyright © 2006, SAS Institute Inc. All rights reserved.

Thank You!