A fix is available
APAR status
Closed as program error.
Error description
SQLCODE -104 issued when BINDCOPY SQL PL procedure contains OPEN USING statement
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * All DB2 12 for z/OS users of an OPEN cursor statement with * * USING clause that references an SQL variable or SQL * * parameter in a native SQL procedure. * **************************************************************** * PROBLEM DESCRIPTION: * * Unexpected sqlcode -104 is issued during local BIND COPY of * * a native SQL procedure that satisfies the following * * conditions: * * 1. contains an OPEN cursor statement with USING clause * * * * 2. the USING clause references an SQL variable or SQL * * parameter * **************************************************************** * RECOMMENDATION: * **************************************************************** Unexpected sqlcode -104 is issued during local BIND COPY of a native SQL procedure that satisfies the following conditions: 1. contains an OPEN cursor statement with USING clause 2. the USING clause references an SQL variable or SQL parameter The following example will recreate the problem: CREATE PROCEDURE MYTEST (IN PARM1 INT, OUT PCODE INT) BEGIN DECLARE INTVAR1,INTVAR2 INT DEFAULT 1; DECLARE VAR2 INTEGER; DECLARE SQLCODE INT; DECLARE STMT CHAR(100) DEFAULT 'SELECT ?+15 FROM N100TST WHERE COL2=?'; DECLARE CS1 CURSOR FOR S10; SET VAR2 = 101; SET INTVAR1 = 11; PREPARE S10 FROM STMT; OPEN CS1 USING VAR2, INTVAR1; FETCH CS1 INTO INTVAR2 ; INSERT INTO TEST1 VALUES(INTVAR2); CLOSE CS1; END! SQLCODE -104 issued on a local bind copy of the above native SQL procedure.
Problem conclusion
DB2 is updated to successfully do the local BIND COPY of the native SQL procedure. Additional Keywords:SQLNATIVESQLPL SQLCODE104
Temporary fix
Comments
APAR Information
APAR number
PI67494
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-08-11
Closed date
2016-09-16
Last modified date
2016-10-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI40852
Modules/Macros
DSNXOYPB
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RC10 PSY UI40852
UP16/10/01 P F609
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"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
03 October 2016