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:15:08 -0400
Reply-To:     Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:      Re: Looking for SAS best practices
In-Reply-To:  <BAY123-W59A73B18E6F2E2C8BC7DBDEF50@phx.gbl>
Content-Type: text/plain; charset="us-ascii"

As Toby notes, SAS gives you a lot of control over how hard it should hit you over the head when there's a data conversion error at runtime. Take a look at the _ERROR_ automatic variable, the ? and ?? informat modifiers, and the ABORT statement, for a start.

Mike Rhoads

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of toby dunn Sent: Thursday, May 06, 2010 9:49 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Looking for SAS best practices

Just because I wanna be like Mikeeeeeeeeee when I grow up....he he he...

Okay in all seriousness lets see here:

#1) Do you need the macros to begin with. What I find is a good many programs have macros that well just fkat out dont need to be in there. Yet other programs have such poorly designed macros that they just need ot be rewritten. Options and misc. statements should be grouped some how in one or two places in your code. What we have here is a failure to design program(s).

#2.) Well if your talking about using the metadata then yeah you can do with SAS. Not that hard to do, it just may not be the optimal thing to do unless your running a recurring production job.

#3.) You can write your code in such away that you can have SAS shoot up a windo promt and have the ability to totally terminate the program or simply write a bunch of red user error messages in your log when an error occures.

#4.) Mike covered this already, but let me state SAS isn't a data base so no its not going to act like on. I would agree that having someof the DB features would be great.

Toby Dunn

"Don't bail. The best gold is at the bottom of barrels of crap." Randy Pausch

"Be prepared. Luck is where preparation meets opportunity." Randy Pausch

> Date: Wed, 5 May 2010 16:41:44 -0400 > From: matt@TPLUS1.COM > Subject: Looking for SAS best practices > To: SAS-L@LISTSERV.UGA.EDU > > 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 > >

_________________________________________________________________ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.

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