[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



There is an SQR system variable called #return-status, which is returned buy
SQR upon completion (successful or not) of the program. Set this variable to
the value of your choice, and when the SQR finishes, you will be able to
test for it.

HTH

Greg


----- Original Message -----
From: Jason Maurer <JMaurer@WIREDEMPIRE.COM>
To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
Sent: Friday, November 12, 1999 3:33 PM
Subject: Trapping an sqr program status in a dos batch file


> 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.
>