March 2012 Quick Tips

Displaying SAS Proc Names in Enterprise Guide

Date Checks: Cleaning Up Dates


Quick Tip #1 - Displaying SAS Proc Names in Enterprise Guide

If you are a SAS programmer, working with Enterprise Guide can sometimes be like learning a new language.  One of the differences in naming is what EG calls a “Task”.  Experienced programmers know a task as a “PROC”.  Each of these EG tasks (a.k.a PROC’s) has an EG specific name as well.  The default display option in Enterprise Guide is to show the task by its EG name (“Task by Category”).


Alternatively, you can also display EG tasks to include the PROC name.  To do this, the user would click on the drop down menu under the Task List and select “Tasks by Name.”  Now EG will list the task name but on the right hand side will include the analogous SAS Procedure (PROC).  Please note that some procedures will have multiple corresponding tasks (for example PROC SQL).

Date Checks: Quick Tip #2


What should I look for during the data clean-up process?

•          Invalid data values.

•          Missing data values.

•          Values outside of a predetermined range.

•          Duplicate data.

•          Are dates within expected range?

•          Are valid dates received?


The birth date field contains either the customer's birth date or an estimated age if the exact date is unknown.


Reading the birth date field as a date results in a data error.


data birthdt_check;

  infile custdata;

  input @01 NAME     $5.

        @07 BIRTH_DT date9.;



Partial Log:


To cleanly read the birth date field the variable must be read twice and the value stored in 1 of 2 possible variables.


data birthdt_check;

  infile custdata;

  input @01 NAME     $5.

        @07 BIRTHIND $1.@;

  if birthind = 'E' then

    input @09 EST_AGE 2.;


    input @07 BIRTH_DT date9.;



If you wanted to take things a step further, you could make some assumptions to fill in the missing values for estimated age or birth date.