Susan Slaughter

EG 4.2 Tip: Farewell to Informats

In Enterprise Guide, Little SAS Book Series 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 EG4.2  is going to ignore the informats you just specified. I’m sure there will be users calling SAS Technical Support to ask, “Why is EG 4.2 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 dead in EG 4.2. You can still use them in SAS programs, of course, and I suppose you could use them in an INPUT function. However, you won’t use informats much by pointing-and-clicking in EG 4.2.

Why I Use Enterprise Guide

In Enterprise Guide, Little SAS Book Series on January 21, 2010 at 8:02 am

I still run into SAS programmers who say “I don’t see any reason why I should use Enterprise Guide.”

Personally, I am puzzled by this attitude. I love SAS programming too! But that doesn’t stop me from using EG. In fact, I really like writing SAS programs in EG. Here’s an example of why.

Lora Delwiche and I just turned in the final draft of The Little SAS Book for Enterprise Guide 4.2–but we’re not done! Now it’s time for us to create the index. As far as I know the only SAS Press authors who have ever done their own indexing are Lora, me, and Jay Jaffe. You have to be a little crazy to create your own index.

But we’re also smart, so we wrote a SAS program to create our index. Indexes are more complicated than most people would think. It’s not exactly text mining, more like text manufacturing. When we wrote the last edition of this book three years ago, we created an EG project named Index.egp. So now, instead of rummaging around trying to figure out how we created the index last time, all I had to do was open the project and everything was there including a pretty little process flow diagram.

That’s why I like programming in EG, because three years later it’s so much easier to figure out what I did before.

Parlez-vous SAS? (partie trois)

In Enterprise Guide, Little SAS Book Series, SAS Global Forum, SAS Papers, Western Users of SAS Software on December 14, 2009 at 2:57 pm

This is the third part of our interview with Véronique Bourcier for the web site La Référence SAS. In this section of the interview, Lora Delwiche and I talk about what it’s like to collaborate on a book, features we are looking forward to in future releases of SAS software, and conferences we plan to attend.  The first part of the interview was posted on October 19, 2009; the second on November 16, 2009. You can read all three parts of the interview—in English and French—at  www.sasreference.fr.