SQL/MP Programming Manual for COBOL

SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for COBOL529758-003
5-17
SQLCAFSCODE
SQLMSG-BUFFER,
375,
OMITTED,
OMITTED,
OMITTED,
75,
SQLMSG-FILENUM.
...
SQLCAFSCODE
The SQLCAFSCODE procedure returns either the first or the last error in the SQLCA
structure that was set by the file system, disk process, or operating system. If there
was no such error, SQLCAFSCODE returns 0. If the SQLCA is full when an error
occurs, the error is lost.
sqlca required input
is the record name of the SQLCA, which is declared automatically when you
include the INCLUDE SQLCA directive.
first-flag optional input
PIC S9(4) COMP
specifies whether the first or the last error is set in the SQLCA:
The default is the first error.
error-info required output
PIC S9(4) COMP
specifies the error you are requesting. If no error is returned, error-info is 0.
SQLCAGETINFOLIST
The SQLCAGETINFOLIST procedure returns error or warning information that
SQL/MP sets in the SQLCA structure. You specify a list of numbers, called item codes,
to specify the error or warning information, and SQLCAGETINFOLIST returns the
information to a buffer in your program.
ENTER TAL "SQLCAFSCODE" USING
sqlca,
[ first-flag ]
GIVING error-info.
Nonzero value (or omitted) First error
0 (zero) Last error