Previous Topic: SQLCA - (C Language)Next Topic: SQL Work Area (SQLWA)


Description of SQLCA in DB2 Format

Description of SQLCA in DB2 Format:

COBOL

PL/I

Assembler

Description

SQLCAID

SQLCAID

SQLCAID

An eye-catcher for storage dumps, set to SQLCA.

SQLCABC

SQLCABC

SQLCABC

Must be set to the length of the SQLCA: 136.

SQLCODE

SQLCADE (ANSI)
SQLCODE (non-ANSI)

SQLCODE

Value returned from an SQL call. If an exception declaration (WHENEVER statement) is not provided, the recommended practice is that your program include code to check the SQLCODE value immediately after each executable SQL statement.

SQLERRML

SQLERRM

SQLERRM

In COBOL, contains the length indicator for SQLERRMC in the range of zero through 70. It contains zero if there is no error or exception condition, in which case the value of SQLERRMC is not pertinent.

In PL/I, contains the length of the error return string and a brief description of the error.

In Assembler, contains the length indicator in the range of zero through 70. It contains zero if there is no error or exception condition. If greater than zero, up to 70 bytes of error text follows.

SQLERRMC

 

 

In COBOL, contains one or more tokens, separated by X'FF', that are substituted for variables in the descriptions of error conditions.

SQLERRP

SQLERRP

SQLERRP

Contains the name of the CA Datacom/DB module which reported the error.

 

 

SQLERRD

In Assembler, this is the top of error codes (not an actual field).

SQLERRD(1)

SQLERRD(1)

SQLERRD1

Contains the CA Datacom/DB SQLCODE to aid in diagnosing errors. The value in the SQLCODE field is the DB2 equivalent of this value.

SQLERRD(2)

SQLERRD(2)

SQLERRD2

Contains the CA Datacom/DB external return code for some error conditions, to aid in diagnosing errors.

SQLERRD(3)

SQLERRD(3)

SQLERRD3

Contains the number of rows affected after an INSERT, UPDATE, or DELETE (but not rows deleted as a result of CASCADE delete).

SQLERRD(4)

SQLERRD(4)

SQLERRD4

Reserved for future use.

SQLERRD(5)

SQLERRD(5)

SQLERRD5

Reserved for future use.

SQLERRD(6)

SQLERRD(6)

SQLERRD6

Contains the CA Datacom/DB internal return code for some error conditions, to aid in diagnosing errors.

 

 

SQLWARN

In Assembler, this is the top of warnings (not an actual field).

SQLWARN0

SQLWARN0

SQLWARN0

After executing a DBSQLE command this field contains a W if any warning condition has been detected. Check the other warning flags for the specific warning. Otherwise contains spaces, that is, x'40'.

SQLWARN1

SQLWARN1

SQLWARN1

Contains W if the value of a string column was truncated when assigned to a host-variable. Otherwise contains spaces, that is, x'40'.

SQLWARN2

SQLWARN2

SQLWARN2

Contains W if null values were eliminated from the argument of a column function; not necessarily set to W for the MIN function because its results are not dependent on the elimination of null values. Otherwise contains spaces, that is, x'40'.

SQLWARN3

SQLWARN3

SQLWARN3

Contains a W if the number of host-variables in the INTO clause of a FETCH or SELECT INTO statement is not equal to the number of items in the SELECT list. The actual number of columns returned is the smaller of the two numbers. Otherwise contains spaces, that is, x'40'.

SQLWARN4

SQLWARN4

SQLWARN4

Contains W if a prepared UPDATE or DELETE statement does not include a WHERE clause. Otherwise contains spaces, that is, x'40'.

SQLWARN5

SQLWARN5

SQLWARN5

Reserved for future use.

SQLWARN6

SQLWARN6

SQLWARN6

Contains a W if an adjustment was made to a DATE or TIMESTAMP value to correct an invalid date resulting from an arithmetic operation. Otherwise contains spaces, that is, x'40'.

SQLWARN7

SQLWARN7

SQLWARN7

Contains a W if it was generated by a procedure.

SQLEXT

SQLEXT

SQLEXT

Reserved for future use.

SQLWARN8

SQLWARN8

SQLWARN8

Reserved for future use.

SQLWARN9

SQLWARN9

SQLWARN9

Reserved for future use.

SQLWARNA

SQLWARNA

SQLWARNA

Reserved for future use.

SQLSTATE

 

SQLSTATE

 

SQLSTATE

In COBOL and PL/I, this is the ANSI format return code.

In Assembler, this is the execution error return code.

SQLCA2LN

In Assembler, the length of the SQLCA.