A fix is available
APAR status
Closed as program error.
Error description
SQLCODE -20398 incorrectly issued when inserting into an XML column with a BLOB file reference variable
Local fix
No Work Around
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 9 for z/OS and DB2 10 for z/OS * * users of pureXML * **************************************************************** * PROBLEM DESCRIPTION: Two XML related problems: * * * * SQLCODE20398 issued incorrectly * * when a BLOB file reference variable * * or a BLOB locator variable is used * * to insert into an XML column. * * * * ABEND04E RC00E70005 * * DSNNXML.DSNNOGIK:M400 * * when inserting a very large * * XML document. * **************************************************************** * RECOMMENDATION: * **************************************************************** (1) SQLCODE20398 was issued incorrectly because the encoding declaration in the XML declaration was ignored for XML data in BLOB file reference variables and BLOB locator variables. The logic error caused the XML data in BLOB file reference variables and BLOB locator variables to always be XML parsed as UTF-8. The following SQL statements illustrate the problem: DECLARE XMLFile1 SQL TYPE IS BLOB_FILE; EXEC SQL SET :XMLFile1 = BLOB(EBCDIC_STR( '<?xml version="1.0" encoding="IBM037" ?><a1>abc</a1>')); EXEC SQL INSERT INTO T1 (XML1) VALUES(:XMLFile1); When XML parsing the XML data in the BLOB file reference variable, :XMLFile1, SQLCODE -20398 was issued because it was incorrectly XML parsed as UTF-8. The problem does not occur if the encoding for the XML data is actually UTF-8. (2) The ABEND04E RC00E70005 DSNNXML.DSNNOGIK:M400 occurred when a very large XML document, consisting of over 32767 rows in the XML table space, was referenced in a SQL statement. When inserting the rows into the XML table space, a two byte counter variable overflowed, causing the wrong address to be calculated for a row. For an XML document to consist of over 32767 rows, the XML document is likely to be over 400 MB.
Problem conclusion
DB2 was fixed to correctly handle the encoding declaration for the file reference variable and the BLOB locator variable. For handling XML documents that consist of more than 32767 rows, the counter variable was fixed. Additional keywords: XMLALL SQLXML
Temporary fix
Comments
APAR Information
APAR number
PM25980
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-11-04
Closed date
2010-12-29
Last modified date
2011-02-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK63556 UK63557
Modules/Macros
DSNNAINP DSNNOIRT
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":"9.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":"9.1","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
01 February 2011