IBM Support

PI14495: SQLCODE -904/-901 FOR A QUERY OFFLOADED TO ANALYTICS ACCELERATOR WHEN A VIEW IS REFERENCED AS A TABLE EXPRESSION

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • A query which has a view referenced as a table expression failed
    with SQLCODE904 or SQLCODE901 when offloading to IDAA server.
    .
    The failing query:
    WITH A AS (SELECT * FROM APLMAM.VIEW_PMR)
       SELECT MSR_PRD_ID FROM A WITH UR
    .
    MAR_PRD_ID is a column from a view, not a base table column.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of DB2 10 and 11 for z/OS who use  *
    *                 IBM DB2 Analytics Accelerator.               *
    ****************************************************************
    * PROBLEM DESCRIPTION: SQLCODE -901 is incorrectly issued for  *
    *                      a query with a common table expression  *
    *                      that does not have an explicit AS       *
    *                      column list.                            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    SQLCODE -901 is incorrectly issued for a query with a
    common table expression that does not have an explicit AS
    column list.
    For example:
    
    WITH CTE1 AS (
    SELECT * FROM T1) A
    SELECT C1 FROM A;
    
    The -901 SQL error message text would contain the following:
    'Attribute C1 not found'
    
    A workaround is to rewrite the common table expression with
    an explicit AS column list. For example:
    
    WITH CTE1 AS (SELECT * FROM T1) A(C1,C2)
     SELECT C1 FROM A;
    
    For any static SQL query that has been bound for acceleration
    and requires this fix, REBIND the package for the failing query
    after applying this PTF.
    
    KEYWORDS:
    IDAAV3R1/K IDAAV4R1/K SQLCODE901 SQLCTE
    

Problem conclusion

  • Code is fixed so that the query executes successfully on an
    accelerator.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI14495

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-03-26

  • Closed date

    2014-05-02

  • Last modified date

    2014-06-03

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

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

    UI17624 UI17625

Modules/Macros

  • DSNXONZC
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UI17624

       UP14/05/17 P F405

  • RB10 PSY UI17625

       UP14/05/17 P F405

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.



Document information

More support for: DB2 for z/OS

Software version: A10

Reference #: PI14495

Modified date: 03 June 2014


Translate this page: