ERRORS
SET ERRORS <ABORT | CONTINUE | EXIT>
The ERRORS set option determines how OdxSQL behaves when an error is
encountered. The default setting for ERRORS is ABORT.
ABORT is specifically for use with a USE file. With this
setting, an error will cause OdxSQL to stop executing the USE file commands
and return to the OdxSQL interactive prompt.
CONTINUE is specifically for use with a USE file. With
this setting, OdxSQL will continue to process the remaining commands in
the USE file after an error is encountered.
EXIT causes the OdxSQL utility to terminate when an error
occurs, whether using OdxSQL interactively or with a USE file.
Example
ABORT
> set errors abort
> use useme.txt
> connect order.env
*E* Environment requested is nonexistent (C:\omnidex\Demodata\order.env)
OdxSQL stopped processing the commands in the use file.
CONTINUE
> set errors continue
> use useme.txt
> connect order.env
*E* Environment requested is nonexistent (C:\omnidex\Demodata\order.env)
> ;<section=secname>
> open cursor
*E* This statement requires a connection to an environment file
> cd c:\omnidex\bin
c:\omnidex\bin
> ;<end_section>
> select company from customers where state='co'
*E* This statement requires a connection to an environment file
> ;<COMMON>
> DISCONNECT
*E* Invalid instance
> ;<END_COMMON>
>
Because ERRORS was set to CONTINUE, OdxSQL attempted to process the rest
of the commands in the USE file, even though the connect failed. More
errors occurred on commands that required a connection.
EXIT
> set errors exit
> use useme.txt
> connect order.env
*E* Environment requested is nonexistent (C:\omnidex\Demodata\order.env)
C:\omnidex\Demodata>
Because ERRORS was set to EXIT, the OdxSQL utility was terminated when
an error occurred.
Top
|