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

SAS Enterprise Guide: Identifying Errors in the Log

Submitted by on 2012-04-04 – 5:00 AM 3 Comments

In an earlier post, I provided a check log program that you could use with your batch jobs.  There was some really interesting discussions in the Comments about using SAS Enterprise Guide with the log.  Here’s some tips I have for working with the SAS Enterprise Guide logs – everything from some quick tips to changing the style.  

Cruising the SAS EG Log

When you run a program in SAS EG, if there are issues then a red x appears on the Program icon (1) and the Log pane (2) becomes the focus, as shown in the following figure.  When you log has error or warning messages, you can use the arrows (3) to move to the next or return to the last – this is convenient especially when the log stretches from here to Saturn’s inner most rings.  As you click the arrow – each error or warning message becomes the focus.

SAS Enterprise Guide Logs - Finding Errors and Warnings

Adding Some Swagger to Your Log

Does your log lack umph? Lacking style?  Got no swagger?  Why not dress up the messages so they are identified a little easier?  From the Tools > Options window do the following:

  1. Select SAS Programs from the list.  The panel changes to the SAS Programs.
  2. Select Editor Options to display the Enhanced Editor Options window.
  3. Select Appearance. From here you can change the way the SAS program and SAS Log file settings display.

SAS Enterprise Guide Change Log Colors Use Options

To change your SAS Log File appearance, do the following:

  1. Select SAS Log File from the File type drop-down.  
  2. From the File elements list, select Error.  Use the Foreground, Background, and Font Style options to change how the Error Message appears.  I like adding the Bright Yellow background with Red letters because you cannot miss it.
  3. Save the changes.  You can edit the settings  for other items, such as the Warning message.  Go ahead – play around til you find something really tacky to annoy your co-workers when they are looking over your shoulder. 😉

SAS Enterprise Guide Changing the Log or Program Colors


Note: I am using SAS EG 4.3 – however, I think the color changing is available with BASE SAS as well.  

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.

Tricia Aanderud

Director of Data Visualization at Zencos Consulting
Tricia Aanderud is a SAS Business Intelligence and Visual Analytics consultant based in Raleigh, NC who works for Zencos Consulting. She has written several books about SAS, presented papers at many SAS conferences, and has been using SAS since 2001. Contact her for assistance with your next project.
Spread the love

Tags: ,


  • LeRoy Bessler says:

    Some related thoughts for consideration.

    Item 1.

    Since EG does NOT write the SAS log to an easily accessible permanent file on disk, and a user CAN encounter a situation where the EG session’s processing of the submitted code does not always come to a happy ending where the Log is returned and either the session tells the user that it is crashing or just freezes and next step is to kill the EG session with Task Manager (or, less elegantly) rebooting, it can be useful to use PROC PRINTTO to route the log to disk. On disk, it can be reviewed manually with NotePad, or it can parsed with a SAS program.

    Also, if the log is being written to disk, and the code submitted is running for a long time, one CAN inspect the log from time to time, to get a sense of what is going on and possibly detect a situation that should be aborted. However, the SAS log could be getting buffered, and might not necessarily be up-to-the-minute.

    Item 2.

    There are messages other ERROR and WARNING that do have serious significance. One needs to develop one’s own list of standard concerns. E.g., I always check for “UNINITIALIZED”, and, if merges are involved, for “MORE THAN” (this occurs of there are duplicate keys in more than one of the data sets being merged, which is normally not a good situation). I’m sure that other SAS users have other concerns.

    Item 3.

    If running code in production, a log parser is particularly useful. (I am sure that, even if it might be the best practice, EG is sometimes used to run production.) There can be innocuous WARNING messages that always or sometimes pop up. The first time encountered, if it is determined that the message is harmless, and it is deemed likely to always be so, the parser can be coded to ignore it. A parser can create a summary to list each distinct unexpected message found and frequency listing by category. I think I recently read some comment (in this space???) about sending email from a program about exceptions encountered. Well, a parser can do the same thing. If the search was null, probably send nothing. If non-null, send an email with a hyperlink to the summary report. Armed with a summary report, it is easy to inspect the complete SAS log.

    Item 4.

    A log parser is particularly useful if someone other than the program author is going to take over support of a program. The author is usually best qualified to assess the significance of what is in the SAS log. Expecting a less experienced person to scrupulously and astutely inspect a SAS log every time the code runs is a nice idea, but only a program crash can be depended on to always get attention.


  • Good points. I remember speaking with you at IFSUG about this topic! Thanks for dropping by for a visit.

  • Project Log:
    Instead of searching through each and every log in your EG project, you can Turn on Project LOG and EG will assemble all your logs into one window so you can search through the entire project for errors / warnings – much faster.

    Would like to see the same feature for all the SAS code nodes – I’m using EG 4.1 and understand that this may be available in EG 4.3

    Would also like to see and search and replace for all the sas code within an EG project which does not exist – unless you export code to an external file but then it becomes a pain to bring it back into EG as it was before – separate sas code nodes.