|
|
ISQL Reference Manual for ALLBASE/SQL and IMAGE/SQL: HP 3000 MPE/iX Computer Systems > Chapter 2 Getting Started with ISQLHandling Errors |
|
Several types of errors can occur while you are using ISQL:
Usually, you see an error message when an error occurs. Error messages are taken from the message catalog. If you are a native language user, the catalog's name is SQLCTxxx.PUB.SYS, where xxx is the numerical value for the current language. If this catalog cannot be opened, ALLBASE/SQL looks for the default NATIVE-3000 message catalog, SQLCT000.PUB.SYS. Refer to the ALLBASE/SQL Message Manual for information on interpreting error and warning messages and suggestions on correcting exception conditions. You can also use the HELP command to obtain information on command use and structure if a command error occurs. Commands may contain either syntax or semantic errors. Syntax errors involve erroneous command structure, as when a required parenthesis or keyword is omitted. Semantic errors involve erroneous information, as when the name of a table is misspelled. When you submit an ISQL or SQL command from the terminal and it contains errors, you can recall it from the command history buffer, correct it, then resubmit it. For example:
When you are submitting commands from a command file, the CONTINUE option of the SET command determines what ISQL does when it encounters an erroneous command. If CONTINUE is ON, ISQL continues processing any subsequent commands in the command file. If CONTINUE is OFF, ISQL discontinues processing commands from the file and displays the input prompt. When you submit commands from the command buffer, ISQL continues processing any subsequent commands in the buffer when it encounters an erroneous command. When the EXIT_ON_DBERR option of the SET command is ON, ISQL will terminate immediately if an SQL error occurs. The EXIT_ON_DBERR option has precedence over the CONTINUE option. Some errors may be caused by the following conditions in the DBEnvironment:
Refer to the ALLBASE/SQL Database Administration Guide information on handling these kinds of errors. If ISQL stops running or a STOP DBE command is issued while you are submitting SQL statements, work done by any transactions in progress at termination is automatically undone when the DBEnvironment is next started up. Only work up to the last COMMIT WORK executed prior to termination permanently affects the DBEnvironment. When running ISQL in batch mode, your job can check the following JCWs to ensure that ISQL completed successfully: Table 2-3 JCWs Set by ISQL
|
|