IBM Support

PH09965: INCORROUT WHEN QUERY HAS AGGREGATE AVG FUNCTION AND AN EXPRESSION IS USED IN THE ARGUMENT OF THE AGGREGATE FUNCTION

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Incorrout when query has the built-in aggregate function ,
    the result of the aggregate function is incorrect.
    The issue can occur when the query has the following:
    1) Median function and other aggregate functions (such as: AVG,
       SUM)  used together
    2) No GROUP BY clause is specified
    3) expression is used as an argument of aggregate functions
       (such as: AVG, SUM)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Db2 12 for z/OS users using query                        *
    * without GROUP BY clause but with                             *
    * aggregate function of Median and other                       *
    * aggregate functions (AVG, SUM and etc.)                      *
    * used together. It only occurs when                           *
    * expression is used as an argument                            *
    * of aggregate functions.                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Incorrout may be returned for the                            *
    * built-in aggregate function when                             *
    * the query has the following:                                 *
    * 1) Median function and other                                 *
    * aggregate functions (such as: AVG,                           *
    *    SUM)  used together                                       *
    * 2) No GROUP BY clause is specified                           *
    * 3) expression is used as an argument                         *
    * of aggregate functions (such as: AVG,                        *
    * SUM)                                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Apply corrective PTF when available                          *
    ****************************************************************
    Incorrout may be returned for the built-in aggregate function
    when the query has the following:
    1) Median function and other aggregate functions (such as: AVG,
       SUM)  used together
    2) No GROUP BY clause is specified
    3) expression is used as an argument of aggregate functions
    (such as: AVG, SUM)
    

Problem conclusion

  • Db2 bindtime code is modified to use the correct input to the
    aggregate functions.
    
    Additional Keywords:
     DB2INCORR/K INCORROUT  SQLINCORR  SQLMEDIAN SQLAVG SQLSUM
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PH09965

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-03-20

  • Closed date

    2019-04-08

  • Last modified date

    2019-05-02

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

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

    UI62399

Modules/Macros

  • DSNXOSR
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RC10 PSY UI62399

       UP19/04/19 P F904 ¢

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":"12.0","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":"12.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
02 May 2019