IBM Support

PH34657: DB2 ADMIN TOOL: PARSER ERROR DURING GEN/DDL COMMAND ON A VIEW REFERENCING COLUMNS NAMED CASE

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Db2 Admin Tool: Parser Error during GEN or DDL command on a View
    referencing columns named CASE
    
    
    If a table has a column named "CASE", a reserved word, and if
    the column is referenced in a view, DDL generation fails with
    this error:
    
    Case expression error: CASE not followed by a valid WHEN clause
    
    ADB2PA: The following statement could not be parsed
    

Local fix

  • If the view is created such that the references to the CASE
    column are in quotations, subsequent DDL generation on the view
    is fine.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of the Db2 Administration Tool for     *
    *                 z/OS Reverse Engineering (GEN) function and  *
    *                 other functions that use the parser.         *
    ****************************************************************
    * PROBLEM DESCRIPTION: The parser fails when parsing a view    *
    *                      with a predicate that references a      *
    *                      column named CASE, CAST, or ARRAY.      *
    ****************************************************************
    If a table has a column named CASE, the parser fails when
    parsing a view that references this column in a predicate.
    
    The same problem occurs for columns named ARRAY or CAST.
    
    The parser assumes that CASE, CAST and ARRAY are reserved words
    instead of column names and parsing fails with a syntax error.
    
    For example:
    
    Case expression error: CASE not followed by a valid WHEN clause
    
    ADB2PA: The following statement could not be parsed :
    

Problem conclusion

  • The problem has been resolved.
    
    If parsing CASE, CAST or ARRAY as a reserved word results in a
    syntax error, the parser assumes that it is a column name and
    continues.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH34657

  • Reported component name

    DB2 ADMIN TOOL

  • Reported component ID

    568851500

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-02-19

  • Closed date

    2021-06-03

  • Last modified date

    2021-07-02

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

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

    UI75679

Modules/Macros

  • ADB2PA
    

Fix information

  • Fixed component name

    DB2 ADMIN TOOL

  • Fixed component ID

    568851500

Applicable component levels

  • RC10 PSY UI75679

       UP21/06/05 P F106

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.

[{"Type":"MASTER","Line of Business":{"code":"","label":""},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSZJXP","label":""},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
03 July 2021