IBM Support

PH44235: SQLCODE -904 RETURNS WHEN A QUERY WITH A STRING CONSTANT ON SELECT LIST AS DESCENDING ORDER IS OFFLOADED TO ACCELERATOR V5

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When a query has a string constant on SELECT list as
    descending order and is sent to IDAA V5, it will return -904
    "Unable to identify an operator '>' for types 'UNKNOWN' and
    'UNKNOWN'".
    .
    SELECT COUNT(*) AS COUNT, 'TABLE1' as TBL_NAME from A.TABLE1
    ORDER BY 2 DESC WITH UR;
    .
    'TABLE1' is not an existing column name.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Db2 12 for z/OS users who use IBM Db2                    *
    * Analytics Accelerator V5.                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * SQLCODE -904 is returned when a query                        *
    * is offloaded to IBM Db2 Analytics                            *
    * Accelerator V5, and the query contains                       *
    * the following characteristics:                               *
    * (1) there is string literal in the                           *
    *    SELECT list.                                              *
    * (2) The string literal is in ORDER BY                        *
    *    with descending order.                                    *
    * (3) System encoding scheme is EBCDIC                         *
    *    SBCS or ASCII SBCS.                                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Apply corrective PTF when available                          *
    ****************************************************************
    When the Db2z system encoding scheme is EBCDIC SBCS or ASCII
    SBCS, if there is string literal in the SELECT list and this
    string literal is in ORDER BY with descending order, SQLCODE
    -904 is returned when the query is offloaded to IBM Db2
    Analytics Accelerator V5.
       For example:
       select count(*) as count, 'aaa' as strnam
       from table1
       order by 2 desc;
    Db2z will rewrite the query so that the  query could be
    offloaded to IBMDb2 Analytics Accelerator V5 successfully.
    Additional Keywords:
        IDAAV5R1/K SQLCODE904 SQLORDERBY
    

Problem conclusion

  • With the apar fix, the following query will be offloaded to IBM
    Db2 Analytics Accelerator V5 successfully:
    (1) there is string literal in the
       SELECT list.
    (2) The string literal is in ORDER BY
       with descending order.
    (3) System encoding scheme is EBCDIC SBCS or ASCII SBCS.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH44235

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-02-16

  • Closed date

    2022-03-23

  • Last modified date

    2022-04-01

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

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

    UI79858

Modules/Macros

  • DSNXONZC
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RC10 PSY UI79858

       UP22/03/31 P F203

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.

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"DB2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0"}]

Document Information

Modified date:
02 April 2022