IBM Support

PH65369: AN INCORRECT OUTPUT MAY HAPPEN FOR A QUERY USING THE AGGREGATION FUNCTIONS AND A TABLE WITH DPSI INDEX.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • An incorrect output may happen for table with DPSI index
    (PLAN_TABLE.MERGN = 'U').
    The aggregation functions like MIN() or MAX() may be fetching
    only first qualifying row causing the invalid output if there
    are more rows.
    In rare case, applying this fix may cause an intentional abend t
    o be issued. To avoid the abend, please apply PTF for PH67253.
    Please review the new APAR PH67253 for more details about that r
    egression.
    
    ADDITIONAL SYMPTOMS:
    INCORROUT DB2INCORR/K SQLINCORR SQLINCORROUT SQLMIN SQLMAX
    

Local fix

  • BYPASS/CIRCUMVENTION:
    Please try to rewrite the query to force some sort to avoid
    accessing the table with DPSI index directly.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: For all Db2 for z/OS 12 and 13 users who     *
    *                 have queries using an DPSI index to support  *
    *                 MAX() or MIN() without sort.                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: Incorrect out could happen if the       *
    *                      DPSI index supporting MAX() or MIN()    *
    *                      function is not merging qualified rows  *
    *                      in order. This can be detected in       *
    *                      EXPLAIN PLAN_TABLE where the DPSI       *
    *                      index is marked with MERGN='U'.         *
    ****************************************************************
    * RECOMMENDATION: Apply corrective PTF when available          *
    ****************************************************************
    The potential incorrect out occurs because the DPSI index that
    supports MAX() or MIN() function is not merging qualified rows
    in order.
    
    Additonal Keywords:
    SQLINCORR INCORROUT DB2INCORR/K SQLDPSI SQLMAX SQLMIN
    

Problem conclusion

  • The described problem is fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH65369

  • 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

    2025-02-21

  • Closed date

    2025-06-17

  • Last modified date

    2025-07-31

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

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

    UO03684 UO03685

Modules/Macros

  • DSNXOCSC
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RC10 PSY UO03684

       UP25/06/25 P F506

  • RD10 PSY UO03685

       UP25/06/25 P F506

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":"BU048","label":"IBM Software"},"Product":{"code":"SSEPEK","label":"DB2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Document Information

Modified date:
31 July 2025