NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
E-6
Examples—ERROR
The default is DETAIL unless you have previously set the ERROR_TEXT session
option to BRIEF. (See SET SESSION Command on page S-39 for more
information.)
Examples—ERROR
The following command displays the error text of file system error number 1066:
>> ERROR FS 1066, BRIEF;
Internal error: Occurred in OPEN.
>>
The following command displays the text, cause, and effect of SQL error number
1249:
>> ERROR SQL 1249, DETAIL;
A column cannot be added to an entry-sequenced table.
Cause:
Stated in the error message.
Effect:
The statement fails.
Recovery:
Create a new table with the correct number of columns that
has the same contents as the old table.
>>
Error Messages
SQL returns error and warning information through SQLCI and through programmatic
interfaces.
Each SQL error message is associated with a negative number and each SQL warning
message is associated with a positive number. Some SQL messages are associated with
both a negative (error) and a positive (warning) number because the problem can cause
an error in certain situations and a warning in others.
You can use the ERROR command in SQLCI to get information about a specific error or
warning. You can also modify the SQLCI session options DISPLAY_ERROR,
ERROR_ABORT, ERROR_TEXT, and WARNINGS to control SQLCI action when an
error or warning occurs. See ERROR Command
on page E-5 or SET SESSION
Command on page S-39 for more information.
Within a program, SQL returns error information to the SQLCODE field in the SQLCA
data structure. Specific error messages are not intended to be handled programmatically,