IBM Support

IZ87250: A SQL16082N COULD BE INCORRECTLY THROWN WHEN DOING AN XML UPDATE ON A NEWLY CONSTRUCTED XML DOCUMENT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following error could be incorrectly thrown by queries
    performing an XML Update on a document that was newly
    constructed.
    
    SQL16082N  A target node in one or more replace value of
    expressions is not a
    node that was newly created in the copy clause of the transform
    expression.
    Error QName=err:XUDY0014.  SQLSTATE=10703
    
    This condition will normally happen when we have many element
    siblings under one element parent and the element we are trying
    to
    update is found at the end of the document.
    
    Sample Query:
    
    select
    xmlquery('copy $new := $XMLDOC
             modify do replace value of
    $new/*:ReconciliationExtract/*:AgentTotal
             with
    $new/*:ReconciliationExtract/count(*:ReconciliationAgent)
             return $new
    ')
    from
    (
    SELECT
    XMLDOCUMENT(
          XMLELEMENT(NAME "six:ReconciliationExtract",
            XMLNAMESPACES(
          'http://v1.six.informationmodel.esb.scottishwidows.co.uk'
                  AS "six",
          'http://www.w3.org/2001/XMLSchema-instance'
                  AS "xsi"
            ),
    
    XMLATTRIBUTES('http://v1.six.informationmodel.esb.scottishwidows
    .co.uk
    SIX.xsd' AS "xsi:schemaLocation"),
            XMLELEMENT(NAME "six:ExtractDate", CURRENT TIMESTAMP),
            XMLAGG(
             XMLELEMENT(NAME "six:ReconciliationAgent",
              XMLFOREST(
                T0040.AGENTA_KEY               AS "six:AgentNumber",
                RTRIM(T0040.AGNAME)            AS "six:AgentName",
                T0040.AGSIBNO                  AS "six:SIBNumber",
                T0040.APPOINTED_REP_FRN        AS "six:AppRepFRN",
                RTRIM(T0040.AGTN)              AS "six:Town",
                T0040.AMS_ID                   AS "six:AMSID",
                T0040.MAPPING_STATUS           AS
    "six:MappingStatus"
              )
             )
            ),
            XMLELEMENT(NAME "six:AgentTotal",0)
          )
    ) as xmldoc
    from
    DBCDI001.T0040AGENTA T0040
    where
    t0040.mapping_status in ('3','4')
    ) AS X
    #
    
    The above problem observed in DB2 V9.5 all fixpacks
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All fixpacks below DB2 V9.5 FP8                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * A SQL16082N COULD BE INCORRECTLY THROWN WHEN DOING AN XML    *
    * UPDATE                                                       *
    * ON A NEWLY CONSTRUCTED XML DOCUMENT                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 V9.5 FP8                                      *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 V9.5 FP8
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ87250

  • Reported component name

    DB2 UDB WSE AIX

  • Reported component ID

    5765F3500

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-10-25

  • Closed date

    2011-07-06

  • Last modified date

    2011-07-06

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC75576

Fix information

  • Fixed component name

    DB2 UDB WSE AIX

  • Fixed component ID

    5765F3500

Applicable component levels

  • R950 PSY

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"950"}]

Document Information

Modified date:
06 October 2021