SQL/MP Programming Manual for COBOL

Error and Status Reporting
HP NonStop SQL/MP Programming Manual for COBOL529758-003
9-13
Returning Information From the SQLCA
Table 9-1. SQLCA Structure Fields (page 1 of 3)
Field Name Description
EYE-CATCHER Identification field, always set by the system to CA.
VERSION-ID Current version of the SQLCA; subsequent SQL/MP
software PVUs can change this value.
NUM-ERR-ENTRIES Maximum number of error entries that the ERRORS-ALL
group item can hold. The number is 7.
PARAMS-BUFFER-LEN Byte length of the PARAMS-BUFFER item. The maximum
length is 180 bytes.
SRC-NAME-BUFFER-LEN Length of the buffer that contains the name of the program
source file.
NUM-ERRORS Current number of errors or warnings returned to the
ERRORS-ALL group item.
NEXT-P-OFFSET First empty byte in PARAMS-BUFFER. By subtracting this
number from 180, you can determine the remaining space
in the buffer. The first byte is byte 0.
FLAGS Code for a flag. Interpret the values:
0 No flags
1 More errors or warnings than ERRORS-ALL can hold
2 More parameters than PARAMS-BUFFER can hold
3 Both 1 and 2 are true
PROCEDURE-ID Program ID of the program that contains the SQL
statement receiving the error or warning messages. If
there are no error or warning messages, this field is blank.
USER-LINE-NUMBER Source code line number of the SQL statement that
causes errors or warnings (zero if none occurred).
SYNTAX-ERR-LOC Character position in the SQL statement where the syntax
error occurs. The value -1 indicates that the error is not a
syntax error.
ERROR-LOCATION Buffer that contains the name of the system procedure that
detected the error and the offset within the procedure
where the error occurred.
ROWS Number of rows updated, deleted, or inserted in the table
or protection view. If there is an error on the statement, the
value of ROWS is an approximate count. It could be less
than the number actually changed. This item is set to 0 for
any statement except UPDATE, DELETE, and INSERT.
COST Execution cost of a query as estimated by the SQL
compiler (set only for dynamic SQL programs).
SQLCA-RESERVED Reserved
ERRORS-ALL Group item for error information.