Susan Slaughter

Archive for the ‘Guest Blog’ Category

Tips for Learning SAS

In China, Everything, Guest Blog, Little SAS Book Series, SAS on January 13, 2019 at 8:05 pm

New to SAS?  Here are tips from the translator of The Little SAS Book, Fifth Edition.

Hongqiu Gu, Ph.D. works at the China National Clinical Research Center for Neurological Diseases at the National Center for Healthcare Quality Management in Neurological Diseases at Beijing Tiantan Hospital, Capital Medical University.

He shared these important tips to learn SAS well:

1.  Read SAS Documentation

I have not counted the number of SAS books I have read; I would estimate over 50 or 60.  The best books to give me a deep understanding of SAS are in the SAS Documentation, including SAS Language Reference Concepts, SAS Functions and CALL Routines Reference, SAS Macro Language Reference, and so on.  There are lots of excellent books published by SAS Press, and usually they are concise and suitable for quick learners.  However, when I realized that SAS could give me a powerful career advantage, I needed to learn SAS systematically and deeply.  I believe the SAS Documentation provides the most authoritative and comprehensive learning materials.  Besides, the updated SAS Documentation is free to all readers.

2.  Use the SAS Help and Documentation frequently

No one can remember all the syntaxes or options in SAS.  However, don’t worry, SAS Help and Documentation is our best friend.  I use the SAS Help and Documentation quite often.  Even as an experienced SAS user, there are still many situations in which I need to ask for help from SAS Help and Documentation. Every time I use it, I learn something new.

3.  Solve SAS related questions in SAS communities

As the saying goes, practice makes perfect.  Answering SAS related questions is a good way to practice.  Questions can come from daily work, from friends around you, or from other SAS users on the web.  From 2013 to 2015, I spent a lot of time in the largest Chinese SAS online  community answering SAS related questions and I learned many practical skills in a short period.

4.  Make friends with skilled SAS programmers

Learning alone without interacting with others will lead to ignorance.  I have learned a lot from other experienced SAS users and SAS developers.  We share our ideas from time to time, and benefit a lot from the exchange.

 

 

The Little SAS Book in China

In China, Everything, Guest Blog, Little SAS Book Series, SAS on January 13, 2019 at 4:29 pm

Recently The Little SAS Book reached a major milestone.  For the first time ever, it was translated into another language.  The language in this case was Chinese, and the translator was Hongqiu Gu, Ph.D. from the China National Clinical Research Center for Neurological Diseases at the National Center for Healthcare Quality Management in Neurological Diseases at Beijing Tiantan Hospital, Capital Medical University.

To mark this achievement, I asked Hongqiu a few questions.

Susan:  First I want to say how honored I am that you translated our book.  It must have been a lot of work.  Receiving a copy of the translation was a highlight of the year for me.  How did you learn SAS?

Hongqiu:  How did I learn SAS?  That is a long story.  I had not heard of SAS before I took an undergraduate statistics course in 2005.  The first time I heard the name “SAS,” I mistook it for SARS (Severe Acute Respiratory Syndrome).  Although the pronunciations of these two words are entirely different for native English speakers, most Chinese people pronounced them as /sa:s/.  At that time, I was not trying to learn SAS well, and I simply wanted to pass the exam.  After the exam, all I had learned about SAS was entirely forgotten.  However, during the preparation of my master’s thesis, I had to do a lot of data cleaning and data analysis work with SAS, and I began to learn SAS enthusiastically.

Susan:  Why did you decide to translate The Little SAS Book?

Hongqiu:  Although I highly recommend the SAS Documentation for learning SAS, most beginners need a concise SAS book to give them a quick overview of what SAS is and what SAS can do.  There is no doubt that The Little SAS Book is the best one as the first SAS book for SAS beginners.  However, it was not easy for a Chinese SAS beginner to get a hardcopy of The Little SAS Book because it was not available in the Chinese market and the price was too high if they shopped overseas.  Another barrier is the language.  Most beginners still want an elementary book in their mother language. Besides, lots of R books had been introduced and translated into Chinese.  Therefore, I believed there was an urgent need to translate this book into Chinese.  So I tried several times to contact SAS press to get permission to translate it into Chinese, but no reply.  Things changed when manager Frank Jiang from SAS China found me after my book, The Romance of SAS Programming, was published by Tsinghua University Press.

Susan:  How long did it take you to translate the book?

Hongqiu:  First, I must state that the Chinese version of The Little SAS Book is a collaborative work.  Manager Frank Jiang from SAS China together with managing editor Yang Liu from Tsinghua University Press did much early-stage work to start this project.  We began the translation in early April 2017 and finished the translation in July 2017.  After that, we took more than three months to complete the two rounds of cross-audit to make sure the translation was correct and typo errors were minimized.

Members of the translation team include Hongqiu Gu, Adrian Liu, Louanna Kong, Molly Li, Slash Xin, Nick Li, Zhixin Yang, Amy Qian, Wei Wang, and Ke Yang.

Members of the audit team include Silence Zeng, Mary Ma, Wei Wang, Jianping Xue, and Sikan Luan.

Susan:  What was the hardest part of translating it?

Hongqiu:  The book is written in plain English and easy to understand.  We did not find any particular part that hard to translate.

Susan:  Are there a lot of SAS users in China?

Hongqiu:  There are a lot of SAS users in China.  I’ve no idea what the exact number of SAS users in China is.  With the increasing need for SAS users in medicine, life science, finance and banking industries, SAS users will become more and more prevalent.

Susan:  Thank you for sharing your experiences.  Perhaps someday we can meet in person at SAS Global Forum.

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 SAScommunity.org.

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

SAS Data Step Illustrated: Guest Blog by Jiangtang Hu

In Everything, Guest Blog, Little SAS Book Series, SAS on January 4, 2011 at 11:07 am

The following blog is reprinted by permission of the author Jiangtang Hu. Hu is a SAS programmer living in Beijing who writes blogs in both English and Chinese. (Full disclosure: Hu quoted The Little SAS Book, but I had never met him before he wrote this blog.)

SAS Data Step’s Built-in Loop: An Illustrated Example

Some newbie SAS programmers take SAS as their first programming language ever learned. Sometimes they are confused by the concept of “data step’s built-in loop” even after reading the well-written The Little SAS Book: A Primer:

DATA steps also have an underlying structure, an implicit, built-in loop. You don’t tell SAS to execute this loop: SAS does it automatically. Memorize this:

DATA steps execute line by line and observation by observation.

Programmers could memorize the statement above and apply it well in their programming practices, but still find it hard to get the vivid idea about the so called implicit built-in loop. This post would make it easy.

The following will show an explicit loop example in C++. Note that you do not need to know anything about C++ to get the idea. Suppose that a data file data.dat in D drive holds three numbers

1
2
3

The question is how to (read and) print out these numbers and their sums. Following is the C++ approach (just read the bold section):

#include <iostream>
#include <fstream>
using namespace std;
int main()
{

int x;
int sum=0;
ifstream inFile;
inFile.open(“d:data.dat”);
inFile >> x;

while (!inFile.eof( ))
{
cout<<x<<endl;
sum = sum +x;
inFile >> x;
}

inFile.close( );
cout << “Sum = ” << sum << endl;
return 0;

}

There is an explicit loop in these C++ codes: while (!inFile.eof( )) . While it is not at the end of infile, the codes above will keep print out the numbers and do the accumulation. The final output is

1
2
3
sum=6

The following SAS codes produce the exactly same output:

data _null_;

infile “d:\data.dat” end=eof;
input x;
sum+x;
put x;
if eof then put sum=;

run;

Note that SAS codes do not need an explicit loop to reach to the end of file. There is a so called implicit built-in loop.

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 support.sas.com, sasCommunity.org, SAS-L, or LexJansen.com.
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.

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 !!