This post was kindly contributed by The SAS Training Post - go there to comment and to read the full post. |
At the end of my first blog, I said I would explain more about those literature analyzing skills and what all that literature stuff has to do with SAS. I showed my “skills list” and discussed how learning to write a SAS program could be compared to analyzing a work of literature. The first item on my list was
“Understand the work.”
Moby-Dick and Finnegans Wake have the reputation of being great literature, but they also have the reputation of being difficult. By the time you’re into the beginning chapters of both books, you might not feel like you’re reading great literature. Both books can seem like they’re not worth the effort to keep going. SAS is like that too. You get that first red ERROR in the SAS log that says “Statement is not valid or it is used out of proper order” or “Expecting a (“ and you really wonder whether you should keep going. Yes, it is worth the effort to keep going. But even before you get that first error message or start coding your program or start writing your analytical paper, you have to understand the work.
In the P.O.E.M. (Professional Organization of English Majors) world, this step does involve actually reading Moby-Dick and Finnegans Wake (and more than once!). But that’s not the end of it, you don’t really understand the work until you’ve got all the particulars about it under your belt. For example, merely reading a work of literature would be no different from reading a beach book if all you did was read the book. When you’re a Lit major, you have to know the Who, What, When, Where, and Why of every novel you read.
When you write an analytical paper on a work of literature, these are examples of the 5 “W’s” that pertain to the actual work itself and its author. But then the paper that you’re writing has its own set of questions that must be answered. Who am I writing this paper for? What is the paper about? What question do I have to answer? What case do I have to argue? What character do I have to explain? How am I going to research the paper? How am I going to write the paper? How am I going to deliver the paper?
However, let’s talk about the “W” questions and how they apply to a SAS project or program. At least you don’t have to read Moby-Dick and Finnegans Wake before you write your program!
Before you even put fingers to keyboard, there are some fundamental “W” and other questions
that you need to be able to answer:
What and Where questions
file?
Who questions
Why questions
Other questions
OK, some of these questions are inching into my other blog topics, so I don’t want to give everything away in this post. But consider how understanding the “WHAT” of the data can help you out when you start writing your program. For example, you find out that the data are in existing SAS datasets. So this answer leads you to your LIBNAME statement(s). Or, you find out that the data are in a raw text file or a “flat” file in ASCII text format. This answer leads you to a FILENAME or INFILE statement. Or maybe your data are in Oracle or DB2 and this
answer leads you to a LIBNAME statement and possibly PROC SQL with the Pass-Through Facility.
Answering “WHO” the audience is, may also lead you to answers to the other questions. If the output is for a Marketing Manager or a Sales Manager, they may want summary reports that can be surfaced on the web or the company intranet. If the program output is for business analysts, they may want a SAS dataset or an
Excel file that they can work with. If the output is for people making follow-up phone calls, they may want printed output, where page numbering and readability on paper is important to them.
Most importantly, really understanding “WHAT” you need to do in conjunction with “WHO” you’re doing it for, can help you narrow down the answers to the other questions. When your boss comes up to you and says, “Quick, we need to find out for the VP how much money was spent with vendors in South Carolina last year.” The operative terms are “quick” and “VP”. The correct responses are how quick – within the next 15 minutes, within the next hour, by close of business; and in what form – is an email with the grand total number OK, does he or she want paper list broken down by total amount per vendor, or is a detail list of ALL expenditures needed.
On the other hand, if your boss says “You know, that manual process of recalibrating the framistat is taking longer and longer each month-end. Could you look into whether we can use SAS to replace the process?” Now, the list of questions are the beginning steps in the process of developing your SAS program or set of programs. That’s how you understand the work whether you are writing a paper on a work of literature or whether you are writing a SAS program– by asking questions about the work and finding out the answers to the questions before you
begin.
In my next blog, I’ll talk about using the dictionary and how it can help you become a better SAS user. And, as a reward for those of you who were also English majors, here are some of my “W” answers on writing about Moby-Dick.
Moby-Dick was written by Herman Melville (who). It is a work of fiction (what), loosely based (very loosely based) on Melville’s experience as a sailor aboard the whaling ship Acushnet (more what). Melville primarily wrote the novel at his house, Arrowhead, in Pittsfield, MA (where) . Moby-Dick was published in 1851 (when), after Melville had published a series of more popular novels based on his adventures as a sailor.
People have written criticism, novels and dissertations on the why of Moby-Dick, and that is a discussion best left to the P.O.E.M. crowd. Find me at a user group meeting and I’ll tell you about my theory on the why of Melville’s Moby-Dick.
This post was kindly contributed by The SAS Training Post - go there to comment and to read the full post. |