DB2 - Problem description
Problem IC89879 | Status: Closed |
SQL0480N WITH ASSOCIATE RESULT SET LOCATORS INSIDE EXCEPTION HANDLER WHEN SQLCODE > 0 | |
product: | |
DB2 CONNECT / DB2CONNCT / A10 - DB2 | |
Problem description: | |
A SQL procedure that sets an ASSOCIATE RESULT SET LOCATOR inside an exception handler could fail with an SQL0480N error ("The procedure "<procedure-name>" has not yet been called.") if the SQLCODE of the corresponding stored procedure is greater than zero. For example, inside the exception handler the following code could cause the stored procedure to fail when executed: DECLARE EXIT HANDLER FOR SQLEXCEPTION, SQLWARNING BEGIN -- MUST get all of the values in a single call here since the values will be reset after each line that is executed SET v_SQLCODE = SQLCODE, v_SQLSTATE=SQLSTATE; -- get the result set that is returned by the ADMIN_CMD stored procedure ASSOCIATE RESULT SET LOCATORS(result1) WITH PROCEDURE SYSPROC.ADMIN_CMD; ALLOCATE rsCur CURSOR FOR RESULT SET result1; -- read the data from the result set that is returned by the LOAD utility FETCH rsCur INTO v_ROWS_READ, v_ROWS_SKIPPED, v_ROWS_LOADED, v_ROWS_REJECTED, v_ROWS_DELETED, v_ROWS_COMMITTED, v_ROWS_PARTITIONED, v_NUM_AGENTINFO_ENTRIES, v_MSG_RETRIEVAL, v_MSG_REMOVAL; SET msg = 'Error while loading data. SQLCODE: ' || v_SQLCODE || ' SQL State: ' || v_SQLSTATE || '. Execute the following SQL to view the LOAD utility messages: ' || v_MSG_RETRIEVAL; END; -- end of error handler | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v10.1, Fixpak 3 * **************************************************************** | |
Local Fix: | |
n/a | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 Version 10.1, Fixpak 3 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC95324 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 28.01.2013 27.09.2013 27.09.2013 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.3 | |
10.1.0.3 |