Date: Fri, 29 Feb 2008 13:14:37 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: Send an email to the users
In-Reply-To: <200802291634.m1TBl1Om002719@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
You need to get control over the execution and completion STATUS of
each program. I would do this using a SAS program that executes the
44 programs via SYSTASK. You can run each one wait for it to complete
check the STATUS, even parse the LOG is you want, send yourself email
or create other reports based on your findings. Then do it all again
for the next program. You and drink the office approved beverage of
your choice while this job runs. Then take whatever action is needed
based on the reports generated by the program.
Sort of like this perhaps.
systask command 'sas -sysin prog1.sas' wait status=RC1;
code to examine the value of RC1 and produce report or send email.
systask command 'sas -sysin prog2.sas' wait status=RC2;
code to examine the value of RC2 and produce report or send email.
Of course this can be all "looped-up" and "macrofied" once get it
working for one program.
SYSTASK COMMAND "operating system-command"
<WAIT | NOWAIT>
<TASKNAME=taskname>
<MNAME=name-var>
<STATUS=stat-var>
<SHELL<="shell-command">>;
On Fri, Feb 29, 2008 at 11:34 AM, DP <adsingh78@gmail.com> wrote:
> Hello!
>
> I have to run 44 different sas programs everyday and check their logs to
> see if the programs have completed the execution or not. This process
> becomes boring & tiring at times.
>
> I am trying to figure out if there can be an automated process in sas to
> run these programs daily, & if the program failed then notification can be
> sent maybe in the form of an email.
>
> Thanks for all you great help!
>
> DP.
>