Date: Fri, 30 May 2003 15:19:56 +0100
Reply-To: SAS User <sasuser@GUILDENSTERN.DYNDNS.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS User <sasuser@GUILDENSTERN.DYNDNS.ORG>
Subject: Re: Schedule SAs jobs on Unix without LSF
Content-Type: text/plain; charset=us-ascii
on Fri, May 30, 2003 at 04:21:03AM -0400, Tony (hztangli@YAHOO.COM) wrote:
> Hi All,
> We have SAS/Warehouse Administrator and a bunch of sas jobs(many of
> source codes automatically generated by WA).We don't have LSF,only have
> AT ,CRON available on Unix and a lot of these sas jobs have dependence
> between each other.How to schedule all these jobs?Could someone tell me
> all the possible solutions(better with some examples) and what's the best
> one and why?
> Thanks and any help would be appreciated
Describe the interdependencies between jobs.
If jobs must run in sequence, and job2 runs after job1 only if job1
echo "sas job1 && sas job2 || echo 'error in processing'" | batch
...which works IFF your SAS jobs run with *no* errors or warnings
(otherwise SAS sets a nonzero exit flag). You can test more complex
relationships with the '$?' exit status automatic shell variable.
If your dependencies are file dependent (eg: run job2 depends on
file output1 existing), you can use the 'make' utility (or as has been
suggested here recently, the more flexible 'ant') to run job2 only if
its prerequisites are met. This also allows you to rerun only those
parts of a job which require re-execution on some change. This method
can be extended by creating "semaphore" files (essential job status
files) which can be checked for subsequent execution.
Unix also provides a large number of tools for testing existence and
properties of files, both in shell (bash, zsh, bourne, or ksh
recommended) and Perl or Python (more advanced scripting languages).
More details on your requirements would be helpful.
Charming man. I wish I had a daughter so I could forbid her to marry one...