A fix is available
APAR status
Closed as program error.
Error description
SQLCODE -504 could happen when executing remote rebind for sql statement which contains positioned update or delete for allocated cursor, but remote bind with sqlerror(continue) is successful. This is a retrofit of APAR PI25066 to DB2 10.
Local fix
n/a
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 10 for z/OS users of an * * UPDATE statement using an invalid cursor. * **************************************************************** * PROBLEM DESCRIPTION: SQLCODE504 from DSNXEPP is received * * during a remote rebind for an * * UPDATE WHERE CURRENT OF * * statement with an invalid cursor. * * The statement was bound successfully * * with SQLERROR(CONTINUE). * **************************************************************** * RECOMMENDATION: * **************************************************************** For example, 1. Create an alias on STLEC1A for a remote table TBB CREATE ALIAS SYSADM.REMAL_TB FOR STLEC1B.SYSADM.TBB; 2. Create table TBB on STLEC1B CONNECT TO STLEC1B; CREATE TABLE TBB (C1 INT); 3. Create a cursor DECLARE CUR1 CURSOR WITH HOLD FOR SELECT C1 FROM REMAL_TB WHERE C1 IN (SELECT C1 FROM SYSIBM.SYSDUMMY1) FOR UPDATE OF C1; This statement receives SQLCODE512 because the cursor references multiple locations. The statement was bound successfully with bind option SQLERROR(CONTINUE). 4. Update using the cursor which is defined above EXEC SQL UPDATE REMAL_TB SET C1 =1 WHERE CURRENT OF CUR1; Rebind receives an SQLCODE504 from DSNXEPP because DB2 did not handle the remote object referencing in the UPDATE WHERE CURRENT OF correctly.
Problem conclusion
DB2 was updated to remove SQLCODE504 from DSNXEPP for the UPDATE WHERE CURRENT OF statement which references a remote object using an invalid cursor during rebind. Additional Keywords: SQLBIND SQLREBIND SQLREMOTE SQLUPDATE SQLWHERECURRENTOF
Temporary fix
Comments
APAR Information
APAR number
PI28663
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2014-10-29
Closed date
2015-01-16
Last modified date
2015-03-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI24478
Modules/Macros
DSNXODML
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RA10 PSY UI24478
UP15/02/03 P F502
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Document Information
Modified date:
06 May 2020