DB2 SQL Errors Codes and Error Messages and Warnings from Error -470 to -472

SQLServerF1

Error: DB2 SQL Error: SQLCODE=-470, SQLSTATE=39004, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
SQL CALL STATEMENT SPECIFIED A
NULL VALUE FOR INPUT
PARAMETER number, BUT THE
STORED PROCEDURE DOES NOT
SUPPORT NULL VALUES.
Explanation: DB2 received an SQL CALL statement
for a stored procedure and found a null value in the
incoming parameter list. The stored procedure was
defined in the SYSIBM.SYSROUTINES catalog table
with PARAMETER_STYLE of GENERAL, which
specifies that the routine does not accept null values.
A call to a stored procedure with a LANGUAGE value
of JAVA receives this SQLCODE if an input parameter
in the Java stored procedure has a Java base type that
cannot be set to a null value.
number
The parameter number from the ORDINAL
field in SYSIBM.SYSPARMS.
System action: The statement cannot be executed.
Programmer response: If the stored procedure should
not accept null values, change the calling application to
provide a non-null value.
If the stored procedure should accept null values, use
the ALTER PROCEDURE statement to change the
PARAMETER STYLE of the stored procedure to be
DB2SQL or GENERAL WITH NULLS.
SQLSTATE: 39004

Error: DB2 SQL Error: SQLCODE=-471, SQLSTATE=55023, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
INVOCATION OF FUNCTION OR
PROCEDURE name FAILED DUE TO
REASON rc
Explanation: A routine was invoked. The routine
invocation was not accepted because of DB2 reason
code rc.
name The name of the routine that was invoked.
rc The DB2 reason code describing the cause of
the failure.
System action: The statement cannot be executed. A
DSNX9xx message describing the error might be
displayed on the MVS system console.
Programmer response: Correct the condition described
by the DB2 reason code.
SQLSTATE: 55023

Error: DB2 SQL Error: SQLCODE=-472, SQLSTATE=24517, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER=
CURSOR cursor-name WAS LEFT OPEN
BY EXTERNAL FUNCTION
function-name (SPECIFIC NAME
specific-name)
Explanation: The function program did not close the
specified cursor. Modify the function program so that it
closes the cursor.
System action: The statement cannot be executed.
Programmer response: Reissue the statement when
desired.
SQLSTATE: 24517

Above are list of DB2 SQL Errors and Warnings from Error -470 to -472 received while performing certain operation against DB2 Database or related products.

SQLCODE – Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE is set by DB2 after each SQL statement is
executed. DB2 conforms to the ISO/ANSI SQL standard as follows:
If SQLCODE = 0, execution was successful.
If SQLCODE > 0, execution was successful with a warning.
If SQLCODE < 0, execution was not successful.
SQLCODE = 100, “no data” was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table.

SQLSTATE – SQLSTATE is also set by DB2 after the execution of each SQL statement. Thus, application programs can check the execution of SQL statements by testing SQLSTATE instead of SQLCODE.

Hope this was helpful.

Thanks,
SQLServerF1 Team
Information about DB2 SQL Error Codes and Error Messages on Windows, Linux and Z/OS Operating Systems.

 

Leave a Reply

Your email address will not be published. Required fields are marked *