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

STOP IN VERSION 3



        With SQR version 3 we have encountered a problem using the command
STOP. Seems that STOP fails to return to the host operating system the
value previously set with the reserved word #return-status.

         We use the following procedure when a sql-error
is encounterd which caused the program to abort thus notifying the host
operating system with a fatal error message. With our VMS operating system
this is helpful when running SQR thru a command procedure :
                $ SET ON
                $ ON ERROR GOTO ERROR_RTN
Failure to return error-status to the host operating system
does not cause the jump to the ERROR_RTN routine in the command procedure.

         When a command procedure has more than one process/program
to run, this causes a bigger problem because the job should abort but goes on
to the next process.  We are writing around some of this but wondered
why this "abrupt" stop command would be changed so.

It seems that the stop command is interpreting the successful completion
of the sqr program and returning good status to the host operating system
regardless of setting of the reseved word #return-status.

The stop in the following procedure overrides the #return-status = 1076.
The message is still displayed (printed in program .log file but
any indication to our operators is not present)

BEGIN-PROCEDURE ERROR-HANDLER
let #return-status = 1076
Display 'Program had completed abnormally - Error below'
Display $sql-error
stop
END-PROCEDURE


       We have also noticed that in previous versions of SQR the default oracle
error routine would return to the host operating system the contents of
#return-status. It seems that if no ON-ERROR is declared in SQR programs
the default routine returns the oracle error but returns
good status to the operating system.


        Has anyone else had any encounters with this ?

 **********************************************************************************
 Lori Reed                                 phone:    (315)341-3513
 Senior Programmer/Analyst                 email:    reed@soswvb.oswego.edu
 Administrative Computer Center            fax:      (315)341-5799
 102 Culkin Hall
 State University of New York at Oswego
 Oswego NY, 13126
 **********************************************************************************