[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



Jsaon,

In order to trap the status code from SQR under NT you must invoke SQR using
the start command:

START /WAIT SQRW {Program} {Connectivity} {Flags} {Arguments}

After SQRW finishes you can test the environment for the return status.

For example (using the attached files)

start /wait sqrw el / -xl
el

Should produce a message that the return status of 123 was detected.

Hope this helps.

Peter


Jason Maurer wrote:

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

 move 123 to #return-status

end-report

el.bat