Using the SQL Communications Area

About this task

The fields that make up the SQL Communications Area (SQLCA) are automatically included by the REXX/CICS DB2 when you issue SQL. The SQLCODE and SQLSTATE fields of the SQLCA contain SQL return codes. These values are set by the REXX/CICS DB2 after each SQL statement is executed.

The SQLCA fields are maintained in separate variables rather than in a contiguous data area. The variables that are maintained are defined as follows:
SQLCODE
The primary SQL return code.
SQLERRM
Error and warning message tokens. Adjacent tokens are separated by a byte containing X'FF'.
SQLERRP
Product code and, if there is an error, the name of the module that returned the error.
SQLERRD.n
Six variables containing diagnostic information. (The variable n is a number between 1 and 6.)
Note: The count of the number of SQL rows affected by the DELETE, INSERT, and UPDATE command is contained in SQLERRD.3.
SQLWARN.n
Eleven variables containing warning flags. (The variable n is a number between 0 and 10.)
SQLSTATE
The alternate SQL return code.

Task Task

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/sqlcom.html