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 (December 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 10 Dec 2004 20:23:15 GMT
Reply-To:     Jeff Feeley <meithiweithi@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jeff Feeley <meithiweithi@YAHOO.COM>
Organization: Astra Zeneca (
Subject:      Re: makefiles and SAS
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I have done a little experimenting with using make with SAS. I have used make extensively with C. We work on UNIX and hardly utilize its features. The make utility would be especially useful for huge data sets with millions of records. The current system my company uses is a home grown thing that simply runs sas progs in the order the user puts them in: Data first, tables and listings next. Trouble is if I want to change "The" to "Them" in a single .lst file, one has to run all of the the sas files all over again. Not efficient at all. Imagine sas files that altogether take 24 hours to run. Make looks at file updates and dependencies and only runs what is needed.

It does what it is supposed to do and works with SAS just fine. Here's my make file (saschk is a little error checking shell script I wrote): ------------------------------------

create_rpt.lst: test1.sas7bdat sas saschk create_rpt.log

test1.sas7bdat: test0.sas7bdat sas saschk manip_data.log

test0.sas7bdat: sas saschk create_data.log

ALL: test0.sas7bdat test1.sas7bdat sas saschk create_data.log sas saschk manip_data.log sas saschk create_rpt.log

Rusty Shackleford wrote: > My office uses long chains of SAS programs to process some data that > arrives in flat-file formats. We use shell scripts to automate the > process. For example, a script might look like: > > sas > sas > sas > > Except that this would be about 40 steps long. Anyway, I've been > experimenting with using makefiles to track dependencies so that if we > edit, we only need to rerun everything following that. > > The makefile for the above three programs might look like: > > data1.sas7bdat: > sas > > data2.sas7bdat: data1.sas7bdat > sas > > data3.sas7bdat: data1.sas7bdat > sas > > Then the user can type: > > make data3.sas7bdat > > And make will compare timestamps and figure out what needs to be run. > > Has anyone else done similar work?

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