IBM Support

PH68270: INCORRECT QUERYNO IN REPORTS WHEN SQL HAS STATEMENT FETCH FIRST ROW.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • SQL explain reports may show incorrect query numbers when input
    SQL statement includes both FETCH FIRST ROW ONLY  and then
    QUERYNO
    

Local fix

  • Use keyword QUERYNO in SQL before the statement FETCH FIRST ROW.
    

Problem summary

  • Reports generated by SQL PA show incorrect QUERYNO values when
    SQL statements include FETCH FIRST ROW.
    The ANLCSYST procedure fails to accurately validate database
    existence in SYSIBM.SYSDATABASE during the
    "Change DB2 system ID" task, leading to incorrect system ID
    changes.
    

Problem conclusion

  • SQL PA logic is updated to correctly assign QUERYNO for
    statements using FETCH FIRST ROW.
    Enhanced ANLCSYST validation to reliably check
    SYSIBM.SYSDATABASE entries before proceeding with system ID
    changes, ensuring accurate database detection and preventing
    unintended behavior.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH68270

  • Reported component name

    DB2 SQL PERF AN

  • Reported component ID

    5697F5701

  • Reported release

    510

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2025-09-23

  • Closed date

    2025-11-19

  • Last modified date

    2025-11-30

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

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

    UO05864

Modules/Macros

  • ANL00    ANL04    ANLCHECK ANLCSYST ANLEEE   ANLMAIN  ANLPMAN1
    ANLPPKGE ANLSQLPA ANLTSO
    

Fix information

  • Fixed component name

    DB2 SQL PERF AN

  • Fixed component ID

    5697F5701

Applicable component levels

  • R520 PSY UO05864

       UP25/11/21 P F511

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":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSZJXP","label":"DB2 Tools for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.1.0","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
30 November 2025