LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 6 May 2010 10:07:29 -0700
Reply-To:     "Choate, Paul@DDS" <Paul.Choate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <Paul.Choate@DDS.CA.GOV>
Subject:      Re: Looking for SAS best practices
In-Reply-To:  <p2qf6f643a21005051341w8805458dr727403e6f2b5773c@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

Best practices are dependent on type of use SAS is put to use for - statistical analysis, reporting, production programming, adhoc analysis, etc. I've spent some time at each and how SAS is applied varies directly with the task.

For parsing text files and doing data transformation I think SAS is just about the best Swiss Army data-knife out there. Extremely powerful and very simple to use once you grasp it.

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Matthew Wilson Sent: Wednesday, May 05, 2010 1:42 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Looking for SAS best practices

I'm writing SAS code again after a break for about three years. Here's a few things that bug me in particular about the SAS code I'm reading today:

1. Macros, options, and misc statements are all littered all over the place, so I can't easily reorganize code into smaller units.

2. It would be nice to tell SAS to run everything required to build some particular data set. If all the prerequisites exist and are as recent as they need to be, then just build the last step. This is something that other programmers do all the time with makefiles. They describe all the dependencies for building a system, and then the make utility is smart enough to just rebuild the pieces that are necessary. When a SAS job crashes at the 90% mark, I shouldn't have to sit while it builds all the original stuff again.

3. SAS treats garbage data a little too politely. If I have code that tries to convert a string to a date and it fails, I want a lot more of a sign than a subtle entry in a 10,000-line long file.

4. In the same vein as garbage input, I find it really difficult to add constraints to datasets. I mean stuff like foreign key constraints, or comparisons between columns (excuse me, variables) or things like that.

I'm beginning to wonder if I should rethink the role of SAS. Instead of using SAS for parsing text files, doing data transformation, and then building reports, maybe I should just use SAS for reporting, and doing the first two steps in a scripting language and a relational database.

Don't get me wrong. I love SAS. Stuff like proc summary is NOT easy to replicate in SQL. I don't mean to rant. I want to learn how to set up culture of awesome at this SAS shop.

Matt

-- W. Matthew Wilson matt@tplus1.com http://tplus1.com


Back to: Top of message | Previous page | Main SAS-L page