Susan Slaughter

Archive for February, 2010|Monthly archive page

Guest Blog by Robert Springborn

In Enterprise Guide, Everything, Guest Blog, Little SAS Book Series, Robert Springborn, Sacramento Valley SAS Users Group, SAS on February 26, 2010 at 1:40 pm

Robert Springborn of the California Office of Statewide Health Planning and Development in Sacramento  explains why SAS programmers should learn Enterprise Guide.

My credentials and job experience are extensive.  For 28 years I have used SAS to complete job responsibilities at federal and state agencies, treaty Indian tribes, academic institutions, and private sector jobs.  I am therefore very much a SAS programmer who was very reluctant to use SAS Enterprise Guide.  I used SAS to analyze my dissertation data on a mainframe computer at University of Michigan where I stored my data on a circular reel-to-reel 2-foot diameter tape.  I still have the tape! I can still remember using SAS/GRAPH to create graphs for my dissertation.  It was a very laborious process where each line, mark, and letter was created using a line of SAS program code.   I remember planning the SAS program code in my mind as–pick up the blue pen (SAS code), go to a spot 1 inch down from the left corner and draw a 5 inch vertical line and stop (more SAS code), and so on and so on until the entire graph was created.

Thankfully, the Health Outcomes Center of OSHPD is providing SAS Enterprise Guide 4.2 to all staff.  Given my knowledge of SAS, I was asked to provide a motivational talk to encourage staffers to use SAS EG.  After spending about 3 weeks to take the tutorial Tutorial: Getting Started with SAS Enterprise Guide, and work through examples in the text SAS Enterprise Guide 1: Querying and Reporting Course Notes I, am very surprised with SAS EG.

I recently developed a short talk to motivate staff to use SAS EG.  It provides a simple tour of how to select specific options in SAS Enterprise Guide that will help staff run SAS programs previously created using SAS Display Manager.  These options include creating SAS libraries, selecting a server, loading a SAS program, changing program editor options and printing destination and file type options, etc.  My contribution is the “introduction” or “hook” which compares getting to know SAS EG as getting to know someone new on a “first date.”  The analogy is amazing and was well received here at OSHPD.  Below is a sample of the introduction material of that talk.

SAS and I have been long time devoted friends for 28 years.  “She” has supported me financially for 28 years working at various federal and state agencies, private sector, and academic institutions.  If it were possible I would have married her long ago.  Given all of this I was very reluctant to try something new such as SAS EG as not to offend my “lady.”  To my delight I have discovered that SAS EG is the “unexpected weekend retreats,” the “unexpected gifts at unexpected times,” the “jazz” or the “buzz” that keeps my relationship with my lady new and alive.

My talk was designed to help staff become familiar with SAS Enterprise Guide.  The objective was to give staff the tools they need to take SAS programs previously created in SAS Display Manager and continue to do their job duties by running these programs using SAS Enterprise Guide.  Most of us are very busy and have job tasks that need to be done without spending several days trying to figure out SAS Enterprise Guide.  This talk provides all the information you will need to run your SAS programs in SAS Enterprise Guide.

Consider you and SAS EG are on a “first date.”  Both of you are nervous and understandably you have questions about each other.  Will SAS EG appear devoted to me today and then leave me tomorrow?  Does SAS EG have any strange behaviors that I will not be able to deal with?  Will SAS EG bring any friends or family to this new relationship that will be difficult to deal with?  You and SAS EG have planned a simple afternoon of lunch and a movie.  Hopefully, you will have a great afternoon and enjoy each others’ company.  Hopefully, over time your relationship will grow and you will become best friends.  At the end of this talk you will receive resources which will counsel, nurture, and guide your new relationship.  The resources provided were references to material that further explain SAS EG collected from various SAS User Group conferences.

This “gentle approach” of getting to know a new friend was wonderfully received.

I now have two devoted ladies in my life.  My first date with SAS EG was a success, and SAS loves the excitement of having SAS EG in our life.  Also my first date with Barbara January 22, 2005 resulted in our marriage June 8, 2009 at Lake Tahoe Nevada State Park.  After much deliberation SAS and Barbara are now girlfriends.  SAS is my lady of the day when I am at work and Barbara will have my devotions at other times.  I am a very happy married man !!


Review of The Little SAS Book: A Primer

In Everything, Little SAS Book Series, ODS Graphics, SAS on February 12, 2010 at 3:09 pm

I just found out about a new review of The Little SAS Book: A Primer, Fourth Edition. This unsolicited review appears on page 7 of the Winter 2010 issue of The Missing Semicolon published by Systems Seminar Consultants, a SAS training and consulting company based in Madison, WI.

Click here to read the review.

EG 4.2 Tip: Farewell to Informats

In Enterprise Guide, Everything, Little SAS Book Series, SAS on February 9, 2010 at 11:54 am

In Enterprise Guide 4.2, the Data Grid ignores informats.
Instead of informats, the Data Grid uses the data type and data group you specify to determine how to interpret any data values you enter. I say  it uses an “intelliformat” instead of an informat. Intelliformat is a term I made up since the developers don’t seem to have given this feature a name yet. This new way of handling input data is good–especially for non-programmers who may not be familiar with the intricacies of SAS informats.

However, I do have a couple of concerns. The first is that EG 4.2 still lets you specify informats (in the New Data wizard or the column Properties window). But there is no warning that the Data Grid  is going to ignore the informats you just specified. I’m sure there will be users calling SAS Technical Support to ask, “Why is my Data Grid ignoring my informat?” That’s why I’m warning you now.

My second concern is that there is currently no way to override the intelliformat behavior. So, if you want to type Julian dates into a Data Grid and have them converted to SAS date values, you’re out of luck. It can’t be done in EG 4.2. The default intelliformat for date values recognizes a lot of different types of dates, but not Julian dates. A similar problem exists for anyone who likes to use the $UPCASE. informat to automatically convert character data to uppercase.

It is possible to work around this limitation. (As you probably know, with SAS there is always a way to work around any problem.) Basically, you enter the data as vanilla numeric or character data, and then convert them either by inserting a new column in a Data Grid, or by computing a new column in a query. For example, if you have Julian dates, you would create the column using a data group of numeric (instead of date). Then you would convert the data by inserting a new column in the Data Grid. In the Insert window, you would specify a data group of date, and an expression that uses the DATEJUL function to convert the plain numeric values to SAS date values.

Enterprise Guide 4.2 Insert windowIf you create a computed column in a query, the process is similar. You use the DATEJUL function in an expression to convert the plain numeric values to SAS date values. There is one big difference though between doing the conversion in a Data Grid versus in a query. The Data Grid conversion is applied only once. If you make a mistake or type in more data values, you have to start over and create another new column. A query, on the other hand, will recreate the column every time you run it.

I should point out that informats are not entirely ignored in EG 4.2. You can still use them in SAS programs, of course. You can also specify an informat in the Import Data task when you read text or Excel files (thanks to Chris Hemedinger for reminding me!). I suppose you could also use them in an INPUT function. However, you won’t use informats much by pointing-and-clicking in EG 4.2.