IBM Support

PM47505: TYPE ERROR FOR TYPESWITCH VARIABLE USED IN ARITHMETIC OPERATION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The XQuery typeswitch expression was not correctly assigning
    the datatype of its variables. For example,
    
    typeswitch (.)
    case $b as xs:decimal return ($b+1)
    case $a as element() return ($a/foo/bar)
    default $c return ($c/2);    (: presuming some other numeric :)
    
    mistakenly produced the error:
    
    XJXE0923: [ERR 0740][ERR XPTY0004] The arguments for operator:
    '+' are not type compatible or are not valid types for the
    operator.
    
    This has been corrected so that new variables' types are now
    properly set.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All IBM WebSphere Application Server        *
    *                  Feature                                     *
    *                  Pack for XML users                          *
    ****************************************************************
    * PROBLEM DESCRIPTION: The XQuery typeswitch expression was    *
    *                      not correctly assigning the datatype    *
    *                      of its variables. For example,          *
    *                      typeswitch (.)                          *
    *                      case $b as xs:decimal return ($b+1)     *
    *                      case $a as element() return             *
    *                      ($a/foo/bar)                            *
    *                      default $c return ($c/2);    (:         *
    *                      presuming some other numeric :)         *
    *                      mistakenly produced the error:          *
    *                      XJXE0923: [ERR 0740][ERR XPTY0004]      *
    *                      The arguments for operator:             *
    *                      '+' are not type compatible or are      *
    *                      not valid types for the                 *
    *                      operator.                               *
    ****************************************************************
    * RECOMMENDATION:  Install a fix pack which contains this      *
    *                  APAR.                                       *
    ****************************************************************
    This was an error in type propigation -- essentially, the
    case having succeeded should cause the case variable to be of
    the specified type, but instead it was inhereting the type of
    the typeswitch's argument.
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PM47505

  • Reported component name

    XML FEATUREPACK

  • Reported component ID

    5724J0856

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-09-09

  • Closed date

    2011-10-21

  • Last modified date

    2011-10-21

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

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

    PM47506

Fix information

  • Fixed component name

    XML FEATUREPACK

  • Fixed component ID

    5724J0856

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
09 February 2022