Previous Topic: SQLCANext Topic: Error Handling


Displaying SQL Communication Area Fields

SQLCA Structure

The technique used by the program to access and display SQLCA information may depend on the SQLCA structure and the rules governing use of the host program language.

For example, in the COBOL SQLCA structure, SQLCODE is defined as PIC S9(9) USAGE COMPUTATIONAL. To display any possible SQLCODE value, including a negative value, you should first move the SQLCODE value to a work field defined as PIC -9(4).

Note: For more information about the SQLCA structure, see Requirements and Options for Host Languages.

Displaying an SQL Message

To display an SQL error message, you use the IDMSIN01 entry point to the IDMS module to call a function that formats error message data using information in the SQLERM and SQLCERL fields.

Note: For more information about the requirements for calling IDMSIN01 to display SQL messages, see the CA IDMS Callable Services Guide.