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

Re: STOP IN VERSION 3



     I tested this here with version 3.0.12.2 for VAX/VMS. I ran the
     following program:

       begin-report
       move 1076 to #return-status
       stop
       end-report

     I then did: 'show sym $status', and got back:

       $STATUS == "%X00000434"

     Hex 434 is equal to decimal 1076.

     What version of SQR are you running and what platform and OS are you
     on (VAX, Alpha, VMS or OpenVMS)?

     We did have a bug in earlier versions of SQR 3 where the value
     returned to the OS was 1 instead of 0x2652 when a compilation error
     occurred. Since the program had not even started executing, the
     problem was not after doing a STOP command.

     John L. Kellogg
     MITI Technical Support Manager


______________________________ Reply Separator _________________________________
Subject: STOP IN VERSION 3
Author:  usa.net!SQR-USERS@netcomsv.netcom.com at Internet
Date:    09/04/96 8:24 AM


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