Description of SQLIMSCA fields

The SQLIMS INCLUDE statement provides SQLIMSCA field.

The names in the following table are those provided by the SQLIMS INCLUDE statement.

Table 1. Fields of SQLIMSCA
COBOL name Data type Purpose
SQLIMSCAID CHAR(8) An eye catcher for storage dumps, containing the text 'SQLIMSCA'.
SQLIMSCABC INTEGER Contains the length of the SQLIMSCA: 224.
SQLIMSCODE INTEGER Contains the SQL return code. (See note 2)
Code
Means
0
Successful execution (though there might have been warning messages).
positive
Successful execution, but with a warning condition or other information.
negative
Error condition.

SQLIMSERRML
(See note 1)

SMALLINT Length indicator for SQLIMSERRMC, in the range 0 through 255. 0 means that the value of SQLIMSERRMC is not pertinent.

SQLIMSERRMC
(See note 1)

VARCHAR(158) Contains the error message.
SQLIMSERRP CHAR(8) Provides a product signature and, in the case of an error, diagnostic information such as the name of the module that detected the error. In all cases, the first three characters are 'DQF' or 'DFS' for IMS.
SQLIMSERRD(1) INTEGER Reserved.
SQLIMSERRD(2) INTEGER Reserved.
SQLIMSERRD(3) INTEGER Contains the number of rows that qualified to be deleted, inserted, or updated after a DELETE, INSERT, or UPDATE statement.
SQLIMSERRD(4) INTEGER Reserved.
SQLIMSERRD(5) INTEGER Reserved.
SQLIMSERRD(6) INTEGER Reserved.
SQLIMSWARN0 CHAR(1) Contains a blank if no other indicator is set to a warning condition (that is, no other indicator contains a W or Z). Contains a W if at least one other indicator contains a W or Z.
SQLIMSWARN1 CHAR(1) Contains a W if the value of a string column was truncated when assigned to a host variable.
SQLIMSWARN2 CHAR(1) Reserved.
SQLIMSWARN3 CHAR(1) Contains a W if the number of result columns is larger than the number of host variables.
SQLIMSWARN4 CHAR(1) Contains a W if a prepared UPDATE or DELETE statement does not include a WHERE clause.
SQLIMSWARN5 CHAR(1) Contains a W if the SQL statement was not executed because it is not a valid SQL statement in IMS.
SQLIMSWARN6 CHAR(1)

Contains a W if a field is not initialized with the proper format for the INSERT statement because the field overlays with another field that is of a different type. ZONEDDECIMAL and PACKEDDECIMAL fields are initialized during the processing of an INSERT statement. If the field is overlaid by another field and the field cannot be initialized, W is set for the statement during the EXECUTE call.

SQLIMSWARN7 CHAR(1) Reserved.
SQLIMSWARN8 CHAR(1) Reserved.
SQLIMSWARN9 CHAR(1) Reserved.
SQLIMSWARNA CHAR(1) Reserved.
SQLIMSSTATE CHAR(5) Contains a return code for the outcome of the most recent execution of an SQL statement (See note 2).
Notes:
  1. In COBOL, SQLIMSERRM includes SQLIMSERRML and SQLIMSERRMC. See the examples for the various host languages in The included SQLIMSCA.
  2. For a description of the SQLIMSSTATE values, see SQL codes.