A fix is available
APAR status
Closed as program error.
Error description
MAXIMUM VARCHAR LENGTH 32764 INSTEAD OF VARCHAR(32767). Using a maximum VARCHAR length of 32764 instead of 32767 will prevent overlays and other possible DB2 abends.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 10 and DB2 11 for z/OS users of the * * VARCHAR function. * **************************************************************** * PROBLEM DESCRIPTION: DB2 returns incorrect output when * * integer 32767 is used as the second * * parameter in the VARCHAR scalar * * function and the first parameter * * contains at least 32767 characters. * * The typical incorrect output is an * * empty string returned. * **************************************************************** * RECOMMENDATION: * **************************************************************** DB2 returns incorrect output when integer 32767 is used as the second parameter in the VARCHAR scalar function and the first parameter contains at least 32767 characters. The following example illustrates the problem. 1. Create a table with an XML column. CREATE TABLE T1 (X1 XML); Populate the table with an XML size larger than 32767 bytes. 2. Fetch X1 and convert it to VARCHAR with a length of 32767 bytes. SELECT VARCHAR(XML2CLOB(X1),32767) FROM T1; DB2 code does not handle the maximum VARCHAR function length correctly, and eventually it leads to an 'empty string' incorrect result. Please note, the memory overlay happens when the maximum length is used for VARCHAR and the real data character length is at least 32767. The memory overlay might also lead to the incorrect result, and it might also lead to other unexpected DB2 behavior, like a DB2 crash.
Problem conclusion
DB2 code has been modified to address the above problem caused by a memory overlay. Additional Keywords: DB2INCORR/K INCORROUT SQLINCORR SQLINCORROUT DB2OVRLAY/K SMCOVERLAY
Temporary fix
Comments
APAR Information
APAR number
PM96007
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-08-28
Closed date
2014-05-16
Last modified date
2014-07-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI18073 UI18074
Modules/Macros
DSNXGOU2 DSNXROB9 DSNXROE9 DSNXROHB DSNXROHE DSNXROHL DSNXROHR DSNXROHS DSNXROH1 DSNXROH2 DSNXRORR DSNXROS9 DSNXROVR
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
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":"10.1","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":"10.1","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
01 July 2014