A fix is available
APAR status
Closed as program error.
Error description
Below is the example. There is a comma in the predicate. The comma operator was not supported prior to APAR PM47618/UK73139. Even though the comma operator was not supported, in error, we accepted it and interpreted it as the "AND" operator. SELECT T.* FROM XMLTABLE('$x/a/b[c="1", d="2"]' <== comma in predicate PASSING XMLPARSE(DOCUMENT '<a><b>9<c>1</c></b><b></b><b>8<c>1</c><d>2</d></b></a>' ) AS "x" COLUMNS C1 VARCHAR(3) PATH 'name(.)', C2 VARCHAR(3) PATH 'text()' DEFAULT '0') AS T;
Local fix
Use AND if you mean to use AND.
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 10 for z/OS users of XMLQUERY, * * XMLTABLE and XMLEXISTS functions. * **************************************************************** * PROBLEM DESCRIPTION: The comma operator in XPath predicate * * was mistakenly interpreted as "and" * * operator. After application of PTF * * UK73139, SQLCODE -16031 will be * * issued. * **************************************************************** * RECOMMENDATION: * **************************************************************** The comma operator in XPath predicate was not supported prior to APAR PM47618/UK73139. But DB2 mistakenly interpreted it as "and" operator. For example: In the following query, the XPath in the XMLTABLE function contains the predicate c="1", d="2" . The predicate is mistakenly interpreted as c="1" and d="2" . SELECT T.* FROM XMLTABLE('$x/a/b c="1", d="2" ' PASSING XMLPARSE(DOCUMENT '<a><b>8<c>1</c><d>2</d></b></a>' ) AS "x" COLUMNS C1 VARCHAR(3) PATH 'name(.)', C2 VARCHAR(3) PATH 'text()' DEFAULT '0') AS T; PTF UK73139 adds support for comma operator as the sequence expression. Currently the sequence expression is not allowed in the XPath. After application of PTF UK73139, the query with the comma operator in the XPath predicate will receive SQLCODE -16031.
Problem conclusion
For the query with comma operator in the XPath predicate, the comma operator will need to be changed to "and" operator. Additional keywords: SQLCODE16031
Temporary fix
********* * HIPER * *********
Comments
APAR Information
APAR number
PM61918
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
YesHIPER
Special Attention
NoSpecatt
Submitted date
2012-04-05
Closed date
2012-06-15
Last modified date
2012-08-08
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK79630
Modules/Macros
DSNNCXCO
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RA10 PSY UK79630
UP12/07/06 P F207
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:
08 August 2012