BI Tools

Tips and tricks for building information maps, OLAP cubes, reports, and dashboards

BI Admin

Learn your way around a SAS BI installation.

Visual Analytics

Learn your way around the SAS Visual Analytics tool

Coding & Data

Extract, transform, and load your data into the SAS BI toolset

Stored Processes

Create and design stored processes like a rock star

Home » Enterprise Guide

These are a Few of My Favorite Things… about the SAS Enterprise Guide Program Editor

Submitted by on 2013-03-27 – 6:00 AM 4 Comments

This is the last of what I planned as a three-part miniseries sharing some thoughts on using SAS Enterprise Guide as a programmer.  The first couple posts described what I think of as big benefits of Enterprise Guide: using process flows as a workspace to organize the code in a project; and making it easier to run code on a remote (UNIX) server.  This last post is just a collection of little things I like about the Enterprise Guide program editor.

To be clear, I am not trying to convince you that the Enterprise Guide editor is the best editor you can find for writing a SAS program.  There are lots of great editors out there, with a range of features.  If you’ve got one you love, stick with it.  But if you are moving from coding in DM SAS to coding in Enterprise Guide, these are some of the things you might like.

Side note: I wanted to find a big image of Julie Andrews for the top of the post.  But I figure images from The Sound of Music are probably still copyrighted, and I can’t imagine anything worse than being sued by Mary Poppins.  If you want to be serenaded by Ms. Andrews singing “Favorite Things” as you read this, feel free to go download it, or perhaps better, the Coltrane version.  I’ll wait…

1. Lots of My Favorite Enhanced Editor Tricks Still Work!

The good news in transitioning from the Enhanced Editor to the Enterprise Guide editor is that mostly things feel the same, and many of the same tricks still work.

Pete Lund has a great paper on how to use keyboard macros to make coding easier.  In the Display Manager Enhanced Editor, I hit Ctrl-H to insert a program header, Ctrl-M to insert a macro header, and I have several more.  All of my keyboard macros work in Enterprise Guide.  To make them available, just import the keyboard macro file, as described in Pete’s paper.  You access the keyboard macros via the Program menu:



Another tip I picked up a few years back is to set my log colors to make it easier to spot errors and warnings.  I set both of these to be reversed (white letters or a red/green background).  In Enterprise Guide, you access the dialog box to set these colors via Program->Editor Options.  The dialog box looks familiar, it’s even still called “Enhanced Editor Options!”


My log then looks like:

 Colored log

So if you like the Enhanced Editor, you will be happy to know that you can do most of the same stuff using the Enterprise Guide editor.  (The one thing I miss in Enterprise Guide is the ability to customize my Function Keys.).  And of course, the Enterprise Guide editor can do more.

2. Code Tips!

If you’re a SAS programmer, you are probably used to writing code, not clicking your way through generating code.  You have memorized the complete body of SAS syntax, and can write SAS code as fluently as you write English.  Before Enterprise Guide, you’ve never had much in the way of coding help from your editor, why would you need it now?

Well, I almost never remember the order of the parameters to the TRANWRD function (this is why I use keyword parameters in my macros, I HATE positional parameters!) .  So little tips like below are much appreciated:


And of course SAS is too big for anyone to know it all.  Right now I’m learning the Graphics Template Language.  As I work on a statement, I love that I can ask for a hint that will pop up all the options available for a statement:


Even little things like parentheses matching are surprisingly useful:



3.  Reformat Code

I picked up this last tip from a recent thread on SAS-L.  It’s a little thing, but there are lots of helpful little things in Enterprise Guide.  The question came up of what to do when you receive a bunch of code that is hard to read, because its not indented, there are multiple statements on a single line, etc.  And one response was, “use Enterprise Guide to fix it.”  Huh?  It turns out, that with one click (Ctrl-I or Edit-> Format Code), Enterprise Guide will reformat a messy block of code like this:


into this:


How cool is that?

Never miss a BI Notes post!

Click here for free subscription. Once you subscribe you'll be asked to confirm your subscription through your email account. You email address is kept private and you can unsubscribe anytime.
The following two tabs change content below.

Quentin McMullen

Quentin McMullen has been programming in SAS for 15 years, and for the past year has been working on SAS BI projects. He has presented at national and regional SAS user group conferences, and can often be found corresponding with colleagues on SAS-L.
Spread the love



  • New Shoes says:

    I agree – I always want TRANWRD to be TRANSWRD!

  • New Shoes says:

    Thanks for commenting Tom. I worked with a guy whose coding style I hated … this new feature would have prevented several arguments.

    I don’t always follow my own programming style but I get really upset when others don’t as well!

  • Tom Kari says:

    I like to post on various online forums, but I’m terrible for just hacking out some code. My terrible coding style would be really embarassing except that once I have it working, a quick click to Edit | Format Code, and I look like less of a Visigoth. Thank you SAS!


  • As you have mentioned, my favourite things are the autocomplete on SAS syntax and integrated syntax help. And with SAS Enterprise Guide 5.1 having autocompletion on data set and variable names is handy in avoiding typos.

    I also like the keyword tooltip options to link to the online documentation for additional information.