[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Trapping an sqr program status in a dos batch file



One option that I have seen used is to code the SQR's to output a completion
status in the .log file.  Then have the  batch file search the log files for
the succesfull completion status string.
This, I'm sure is not as eligant a solution as you were hopping for but it
will work if nothing better comes back.

> As part of my daily production, I need to be notified when an SQR job
> fails.  If the job fails I will need to send out an e-mail with some
> sort of error message.  We are submitting our jobs through Batch Job
> Server (BJS) on a Windows NT 4.0 workstation and using SQR (for NT)
> version 4.0.3.  The BJS process used a dos batch file to submit the sqr
> program via the dos command line.  If the BJS batch job fails (can't
> connect to the server or a manual termination) there is an automated
> procedure that kicks off to warn us that an error occurred.  If the SQR
> program fails, the BJS process just keeps going and successfully ends
> when it gets to the completion of the batch file.  What I need to do if
> trap any sqr errors that occur and then evaluate them (in dos) and
> hopefully kick off some sort of notification process.  We have a "blat"
> process set up to send the notification e-mails.  I just need to know
> how to get the sqr error status from the sqr program and then evaluate
> it in dos.
>
> Any help would be appreciated.