Susan Slaughter

Archive for the ‘SAS Papers’ Category

SAS in the Cloud

In Everything, SAS, SAS Papers, Western Users of SAS Software on October 11, 2013 at 10:47 am

Now Appearing at Western Users of SAS Software 2013In a few weeks I will serve as moderator at Western Users of SAS Software 2013 for:

SAS in the Cloud: A Panel Discussion

Panelists:  Rebecca Ottesen, AnnMaria DeMars, Tyler Smith and Amy Peters

Abstract:  Over the last decade, SAS Institute has been quietly developing cloud computing products.  Now several options are available for SAS users via SAS OnDemand for Academics, SAS OnDemand for Professionals, and SAS Visual Analytics.  These products enable you to run SAS over the Internet using a thin client such as a Web browser, SAS Enterprise Guide, or a mobile app.  Come hear a panel of experts discuss the who, what, where and how of using SAS in the Cloud.

If you are at the conference, I hope you will attend our presentation Thursday November 14, 2013 9:00-9:50am. (Note that this is 30 min. later than originally scheduled.) If you cannot make it or you would like to learn more about SAS and Cloud computing, then check out these links to good resources that are—very appropriately—available on the Web:

PowerPoint slides from the panel discussion

General discussion of cloud computing

SAS OnDemand for Academics

SAS OnDemand for Professionals

Video about SAS OnDemand for Professionals

SAS Visual Analytics 6.2: Video Library

Article about SAS and the Cloud, thanks to Tricia Aanderud for sharing this link

SAS document about Cloud computing and link to white paper

Cloud facts, thanks again to Tricia Aanderud for this link

Your Resume–Selling Yourself Using SAS

In Enterprise Guide, Everything, ODS Graphics, SAS, SAS Papers, Western Users of SAS Software on October 4, 2013 at 10:43 am

Now Appearing at Western Users of SAS Software 2013Here is another presentation to which I have contributed for the Western Users of SAS Software 2013 conference.

Your Resume–Selling Yourself Using SAS

I am honored to have served as a co-author with Rebecca Ottesen on this highly original paper.  This paper shows how to use your SAS skills to create a resume that is clever, unique, and effective.

Here is an excerpt:

Your resume should demonstrate strengths and skills, cite meaningful performance metrics, quantify contributions to the organization, and set you apart from the competition, all while being concise and staying to the point.  As a SAS user, it is likely that the skill set you would like to showcase involves programming and data analysis, so it seems perfectly natural that you should use these skills to create content for your resume.  A well thought out SAS graphic or table might be the perfect selling point to catch the attention of a hiring manager.

Here is an example of a graphic showing a timeline for work and academic experience:

Your Resume

If you are at the conference, I hope you will attend our presentation Wednesday November 13, 2013 2:30-2:50pm. If not, then you can download the paper here.

Writing Code in SAS Enterprise Guide

In Enterprise Guide, Everything, Little SAS Book Series, SAS, SAS Papers, Western Users of SAS Software on October 3, 2013 at 7:04 am

Now Appearing at Western Users of SAS Software 2013With the Western Users of SAS Software 2013 conference coming soon, I am looking forward to being part of three presentations.  One of those presentations is

Writing Code in SAS Enterprise Guide

This is based on a paper written several years ago for SAS Enterprise Guide 4.1.  That paper became obsolete almost immediately.  So I’ve been wanting to update it for quite some time.  This new paper applies to Enterprise Guide 4.2, 4.3, 5.1 and 6.1.

Here’s an excerpt:

Using SAS Enterprise Guide, you can manipulate data and run reports without ever writing a single line of SAS code.  So it’s not surprising that many SAS programmers believe that SAS Enterprise Guide is only useful to non-programmers.  If you love the SAS language, why would you ever want to use SAS Enterprise Guide?

It turns out that there are several reasons why you might want to do just that.  SAS Enterprise Guide offers programmers a variety of ways to run code.  You can type a program like you do in Display Manager, but you can also use the point-and-click features of SAS Enterprise Guide to generate programs  that you can then modify.  In addition, SAS Enterprise Guide organizes your work into projects making it easy to find your programs, logs, and results; and the process flow diagrams show at a glance how everything in your project fits together.

However, writing programs in SAS Enterprise Guide does require learning a new environment with new windows and a new system for organizing your work.  As with any new skill, there is a learning curve.  The goal of this paper is to ease that transition by explaining SAS Enterprise Guide from a programmer’s perspective.

If you are at the conference, I hope you will attend my presentation Wednesday November 13, 2013 3:30-4:20pm. If not, then you can download the paper here.

And if you can’t attend my presentation, you may want to watch this video about coding with SAS Enterprise Guide.

Debugging at SGF

In Everything, SAS, SAS Global Forum, SAS Papers on April 25, 2013 at 9:41 pm

Green Stink BugMost people think that all insects are bugs, but, in fact, only species belonging to the order Hemiptera are considered by scientists to be “true bugs.”  There are about 932,000 species of insects, but only 82,000 species of true bugs.  Fortunately for us, there are a lot fewer species of SAS bugs.

SAS bugs can be classified into three general types: syntax, data, and logic.

  • Syntax errors result when your program fails to follow SAS’s rules about the way keywords are put together to make statements.
  • Data errors happen when you have a program that is syntactically sound, but the data values do not fit the program as it was written.
  • Logic errors happen when you have a program that runs, and data that fits, but the result is wrong because the program gave the wrong instructions.

Debugging is one of my favorite topics.  I  believe that debugging your programs is not only necessary, but also a good way to gain insight into how SAS works.  Once you understand why you got an error, a warning, or a note; you’ll be better able to avoid problems in the future.  In other words, people who are good debuggers are good programmers.

I’m looking forward to talking about bugs (both the SAS kind, and some of the creepy-crawly kind too) at SAS Global Forum next week.  If you will be at there, maybe you can catch my presentation.

Errors, Warnings, and Notes (Oh My!): A Practical Guide to Debugging SAS Programs

Tuesday, May 30, 3:30-4:20 Moscone Center Room 2008

I hope you can come to SAS Global Forum, but if you can’t, there are still a lot of great ways to learn and share the excitement.

You can view my paper here.

You can view the proceedings for all SGF 2013 papers here.

You can view some great presentations on SAS Global Forum Take-Out.

You can even view much of the conference live.

Sunil’s Top 10 SAS Papers: Guest Blog by Sunil Gupta

In Enterprise Guide, Everything, Guest Blog, SAS, SAS Papers on February 18, 2011 at 10:59 am

Sunil's Top 10 SAS PapersI recently learned about an interesting resource for SAS users.  Sunil Gupta—a SAS Press author and consultant—maintains lists of his favorite SAS papers on various SAS-related topics.  You can peruse these lists on his page on

Here are some of Sunil’s Top 10s:

Sunil’s Top 10 PROC FORMAT/Functions Papers

Sunil’s Top 10 PROC COMPARE Papers

Sunil’s Top 10 SAS Macro Papers

Sunil’s Top 10 SAS Dictionary Tables Papers

Sunil’s Top 10 ODS Papers

Sunil’s Top 10 DATA Step/MERGE Papers

Sunil’s Top 10 SAS Certification Exam Papers

Sunil’s Top 10 SAS Enterprise Guide Papers

Sunil’s Top 10 Pharmaceutical Industry Papers

Susan’s Macro Mottos

In Everything, Little SAS Book Series, SAS, SAS Global Forum, SAS Papers on February 10, 2011 at 2:56 pm

With SAS Global Forum less than two months away, I am busy putting the finishing touches on my papers.  One of those papers is SAS Macro Programming for Beginners. Of all the conference papers I have written over the years, this is probably my favorite.  Yet oddly, I have only presented this paper once at SGF and that was long ago.  So I am pleased to have an opportunity to dust this paper off.

Don’t expect a lot of advanced macro tricks here.  This paper is exactly what the title says: macro programming for beginners.  It’s a crystal-clear presentation of the basic concepts you need to understand in order to be comfortable in the company of SAS macros.  I can summarize the paper in two sentences that I call “Susan’s macro mottos.”  Here they are:

Susan’s Macro Mottos

Remember: You are writing a program that writes a program.

This is the most important concept to keep in mind whenever you write or debug SAS macros.  If you feel the least bit confused by a macro, repeating this motto can help you to see what is going on.  I speak from personal experience here. This is my macro mantra.

To avoid mangling your macros, always write them one piece at a time.

First write your program in standard SAS code. When that is working and bug-free, then add your %MACRO and %MEND statements. When they are working, then add your parameters, if any, one at a time.  If you make sure that each macro feature you add is working before you add another one, then debugging will be vastly simplified.

If you are lucky enough to attend SAS Global Forum and you want to catch this presentation, look for me in the Milano V-VI room Tuesday April 5, 2011, 10:30-11:20 am.

Click here to download the paper.

Greatest Hits of 2010

In Detritus, Everything, SAS, SAS Global Forum, SAS Papers on January 19, 2011 at 9:55 am

I should have posted this a couple weeks ago, but I’ve been hard at work writing papers for SAS Global Forum (more about that in future posts!).

These were the popular posts and pages on in 2010.

1) What can I use SAS for?

2) Top 10 Reasons to Use SAS Enterprise Guide

3) SAS Papers, Etc.

4) A SAS Horror Story

5) Highlights of SAS Global Forum

Best Wishes for a Peaceful and Prosperous New Year!

SAS Nerd: Guest Blog by Kirk Lafler

In Everything, Guest Blog, SAS, SAS Papers, Western Users of SAS Software on November 23, 2010 at 10:50 am

One of my favorite presentations at the recent Western Users of SAS Software conference was presented by Kirk Lafler of Software Intelligence Corporation.  He has graciously agreed to allow me to share his paper “You Could Be a SAS Nerd If…” on this site.  Here are a few of my favorite parts from his paper:

You Could Be a SAS Nerd If . . .
The following scenarios offer you a way to determine whether you could be a SAS nerd. They are real scenarios based on actual events or experiences by the author and/or comments shared by other SAS users. Could you be a SAS nerd? Let’s see.

1. You own every SAS manual ever written dating back to SAS 76.
6. You celebrate January 1st, 1960 with family and friends.
10. Your home page is,, SAS-L, or
12. You get excited when you find a new match-merge technique that performs better than the one you developed the week before.
18. Your screen name, nickname, or avatar is “Macro Maven”, “SASMan”, “SASGuru” or some other alias containing or referencing SAS software.
21. You have more than one version of SAS on your machine or network so you can compare and contrast program, processing and output differences.
36. With all the different reality shows on television, you wonder why there isn’t one showing the exciting life of a SAS user.

To download the complete paper click here.

YRDIF and Me: A Tale of Woe

In Everything, Little SAS Book Series, SAS, SAS Papers on June 29, 2010 at 12:37 pm


Since I originally wrote this blog post, a new option has been added for the YRDIF function.  The AGE option is not the easy-to-use option that I dreamed of.  However, it does compute accurate ages and that is a huge improvement!  I am now happy to recommend this method for computing current age in integer years:

CurrentAge = INT( YRDIF(BirthDate, TODAY(), ‘AGE’));

However, you should be aware that there are still situations where an alternate method may be better than YRDIF.  You should define exactly what your requirements are, and test different methods (such as INTCK) to see which method best meets your needs.

The original blog post:

In all the long history of The Little SAS Book: A Primer (four editions, five if you count the Revised Second Edition) we have removed only three topics from the book.   We dropped PROC COPY and PROC PLOT (that’s PLOT, not GPLOT or SGPLOT) because they had become largely obsolete.  Now we have removed the YRDIF function, but this situation is different. For the first time ever, we have removed a topic because it doesn’t work.

The YRDIF function has been removed from The Little SAS Book: A Primer, Fourth Edition, starting with the third printing, because it does not compute accurate ages. (YRDIF never appeared in earlier editions.)  In defense of YRDIF I have to point out that it does work the way it was designed to work; but YRDIF, it turns out, was never designed to compute ages.  Specifically, ages computed using the YRDIF function may be incorrect if the starting or ending date falls in a leap year, and the ending date is the person’s birthday. Of course, this situation doesn’t happen all that oftenbut it does happen. So, if you need really accurate ages, then you can’t use YRDIF.

We considered substituting some other method for computing ages (such as INTCK), but it turns out that not only are those methods too complicated to squeeze into the tiny space we had, they also come with their own limitations and problems.  We were forced to conclude that currently there is no single definitive method for computing ages in SAS.  If you need to compute ages in SAS, the best you can do is to choose the one that has the fewest problems for your particular situation.  After much debate, Lora Delwiche and I felt that we had no choice but to simply remove YRDIF from our book.

As a result of all this, we have written a paper, “Computing Ages in SAS: The Removal of the YRDIF Function from The Little SAS Book: A Primer, Fourth Edition.”  This paper explains how YRDIF really works, and then discusses alternate methods for computing ages. You can download this paper by clicking here.

Appearing Soon at SAS Global Forum

In Everything, Little SAS Book Series, ODS Graphics, SAS, SAS Global Forum, SAS Papers on April 8, 2010 at 2:28 pm

In just a few days I will fly to Seattle for SAS users’ biggest event of the year: SAS Global Fourm, April 11-14, in Seattle, WA. I hope to see you there.

If you are a fan of SAS Press, then be sure to visit the Pubs booth in the Demo Room Monday from 6:00-7:30 pm. That’s when SAS Press will host the Authors’ Reception and Book Drawing Mixer. The drawing will feature one book by every published author in attendance. So come on by to meet lots of authors and test your luck.

I just learned that you must register for the book drawing by 6:15 to have a chance to win, and, of course, you must also be present to win. The drawing proper will start promptly at 6:30 and will be over by 6:45!

Then on Tuesday in the highly-coveted 8:00-9:20 am time slot, Lora Delwiche and I will present Using PROC SGPLOT for Quick High-Quality Graphs , in the Hands-on Workshop section, Room 6C. I am enormously grateful that the Kick Back Party is Tuesday night, not Monday! If you are an early riser, then why not join us?

Can’t make it to Seattle? Here are the links for our paper, handouts, data sets.

Using PROC SGPLOT to Create Quick High-Quality Graphs: The Paper One of the great new features in SAS 9.2 is ODS Graphics which includes the SGPLOT procedure. This paper includes both an introduction to PROC SGPLOT, and a concise reference of syntax that you may want to keep on your desk whenever you write PROC SGPLOT code. Other topics covered are PROC SGPANEL, options for controlling and accessing individual graphs, and the ODS Graphics Editor.

Using PROC SGPLOT to Create High-Quality Graphs: The Handout This is the handout for the hands-on part of the workshop. Follow the step-by-step instructions for an introduction to PROC SGPLOT, PROC SGPANEL, and the ODS Graphics Editor. (Note that you also need the data sets available below.)

Using PROC SGPLOT to Create Quick High-Quality Graphs: The Data This zipped file contains the SAS data sets used in the paper and hands-on workshop. Using these data, you can run the examples yourself.

Quick Reference Tables for PROC SGPLOT This file contains tables summarizing the rather extensive syntax for PROC SGPLOT. These tables are a good tool for learning PROC SGPLOT, and also a handy reference. These are the same syntax tables that appear in the paper listed above but are in grayscale instead of color.