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 (November 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 29 Nov 2007 11:36:28 -0600
Reply-To:   "data _null_," <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_," <datanull@GMAIL.COM>
Subject:   Re: Learning to program better and in a more organized way
Comments:   To: Peter Flom <peterflomconsulting@mindspring.com>
In-Reply-To:   <13029695.1196347927429.JavaMail.root@mswamui-blood.atl.sa.earthlink.net>
Content-Type:   text/plain; charset=ISO-8859-1

I'm still working on the "program better" part. One sure way, and easy too, to keep up with printed output that you deliver to others is to include simply "program name and run date and time", On every output you produce. Put in your AUTOEXEC allong with other project initialization that is desired.

A simple footnote created at run time is one way to achieve this.

A stored program executed from auto exec as "data pgm=pgmlib.name; execute; run;" is one of my favorites.

libname pgmlib '.';

data _null_ / pgm=pgmlib.getSYSINdata; length sysinFilePath sysinFileName $300; if getoption('DMS') eq 'DMS' then do; sysinFilePath = sysget('SAS_EXECFILEPATH'); sysinFileName = sysget('SAS_EXECFILENAME'); end; else do; sysinFilePath = getoption('SYSIN'); sysinFileName = scan(sysinFilePath,-1,'\'); end; call execute(catx(' ','FOOTNOTE1',quote(cat(strip(sysinFilePath),': ',put(datetime(),datetime16.))),quote(repeat(' ',100)),';')); /*call symputx('sysinFilePath',sysinFilePath,'G');*/ /*call symputx('sysinFileName',sysinFileName,'G');*/ run;

run;

data pgm=pgmlib.getSYSINdata; /*describe;*/ execute; run;

%put _user_;

proc goptions footnote nolist; run; quit;

But be sure to do easy stuff that is useful. Not sure exactly what that is but one thing is to have all your "printed" output identified with regards to source. That is label the output with the program name and run date and time. It won't help if you don't use it religiously, so put it autoexec.sas. Just one part of that whole project management thing.

On Nov 29, 2007 8:52 AM, Peter Flom <peterflomconsulting@mindspring.com> wrote: > Hello again > > This is sort of a repeat request, but I don't recall any responses.... > > I've been using SAS a long time (15 years or so). I manage OK with the STAT part, and, until now, with most of the rest, often with help from this very list. > > Until recently, though, I was largely dealing with one data set at a time, and with analyses that were usually 'one-off' - I ran the analysis, helped write a paper, and then on to something else. > > Now, though, I am dealing with a much larger data set - in fact, with several large data sets that differ slightly. And the analyses I do now are often repeated as new data comes in, and have to be shared with more people 'as is' rather than only by me. (By large data set I mean roughly 2000 variables and on the order of 1000 subjects). And I have to be more careful how I modify the data sets, because they are likely to be used by others (including people with legacy programs they are not willing to abandon, some not even SAS (gasp). > > My programs are getting longer and more complex, and I am getting more and more confused. > > How do people deal with this sort of thing? > > It's not so much that my data steps are getting really hard (although I am doing some of that) as that it's just confusing keeping track of all the programs, what each part does, what each data set is, and so on. > > I do add commments to my programs, but you can't see those comments when you are trying to remember which program did what. > > > Any tips, resources, ideas would be welcome > > thanks in advance, as always > > Peter >


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