Error and Status Reporting
HP NonStop SQL/MP Programming Manual for C—429847-008
9-12
Returning Information From the SQLCA Structure
Returning Information From the SQLCA Structure
NonStop SQL/MP returns run-time information, including errors and warnings, for the
most recently run SQL statement to the SQL communications area (SQLCA). The
SQLCA structure can contain up to seven error or warning codes (in any combination)
that might be returned by a single SQL statement or directive.
Declaring the SQLCA Structure
To declare an SQLCA structure, specify the INCLUDE SQLCA directive using this
syntax (if you do not first specify the INCLUDE STRUCTURES directive, NonStop
SQL/MP generates version 2 structures by default):
For a description of the information returned to the SQLCA structure, see the
SQLCAGETINFOLIST procedure item codes in
Section 5, SQL/MP System
Procedures
.
Using System Procedures With the SQLCA Structure
Table 9-3
describes the SQL system procedures you can use to retrieve and display
information from the SQLCA structure. To call these procedures, a program must
include declarations from the
cextdecs
header file.
For more information about these SQL/MP system procedures, see
Section 5, SQL/MP
System Procedures
.
EXEC SQL INCLUDE SQLCA;
Table 9-2. C Identifiers Generated by the INCLUDE SQLCA Directive
Name Value
Description
SQLCA_EYE_CATCHER
CA
Eye-catcher value
SQLCA_LEN
430
Length in bytes of the SQLCA structure
Table 9-3. System Procedures for the SQLCA Structure
System Procedure
Description
SQLCADISPLAY
Writes SQL error and warning messages from the SQLCA
structure to a file or terminal
SQLCAGETINFOLIST
Writes a specified subset of the SQL error or warning
information from the SQLCA structure to a record area in the
program
SQLCATOBUFFER
Writes SQL error or warning messages from the SQLCA
structure to a record area in the program
SQLCAFSCODE Returns
information
about file-system, disk-process, or
operating system errors returned to the program
Summary of Contents for NonStop SQL/MP
Page 4: ......
Page 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Page 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Page 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...