IBM Support

PI37750: DB2 ADMIN TOOL DDL LINE COMMAND DOES NOT FORMAT VIEW WITH NESTED CAST CLAUSE

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Using DDL Line command on a view with nested CAST clause
    returns:
       CAST <expression> not followed by AS
    
       ADB2PA: The following statement could not be parsed :
    
       CREATE VIEW ... (complete View DDL);
    
       Token number =    326, Token = (
       ***
    
    then pressing enter shows the unformatted DDL in an ISPF edit
    session.
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of the DB2 Administration Tool for     *
    *                 z/OS who use the DDL or GEN command to       *
    *                 generate SQL from the DB2 catalog for        *
    *                 a VIEW.                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: When the CREATE SQL statement for a     *
    *                      VIEW contains the TRIM function         *
    *                      and the user performs the DDL           *
    *                      or GEN command to generate SQL          *
    *                      from the DB2 catalog for a VIEW,        *
    *                      DB2 Admin fails.                        *
    *                                                              *
    *                      For example, if the CREATE VIEW         *
    *                      statement contains the following:       *
    *                                                              *
    *                      CAST (DIGITS(aaa1). ||                  *
    *                      RIGHT('0000000000' ||                   *
    *                      TRIM(BOTH FROM aaaaa),10)               *
    *                      AS CHAR(19))                            *
    *                                                              *
    *                      the error message below is              *
    *                      displayed:                              *
    *                                                              *
    *                      CAST >expression< not followed by       *
    *                      AS                                      *
    *                      ADB2PA: The following statement could   *
    *                      not be parsed                           *
    *                      :                                       *
    *                      CREATE VIEW >view_name< AS SELECT       *
    *                      *** printing the whole DDL ****         *
    *                      Token number =    326, Token = ..       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When the CREATE SQL statement for a VIEW contains the TRIM
    function and the user performs the DDL or GEN command to
    generate SQL from the DB2 catalog for a VIEW, DB2 Admin fails.
    
    For example, if the CREATE VIEW statement contains the
    following:
    
    CAST (DIGITS(aaa1). || RIGHT('0000000000' || TRIM(BOTH FROM
    aaaaa),10) AS CHAR(19))
    
    the error message below is displayed:
    
    CAST <expression> not followed by AS
    ADB2PA: The following statement could not be parsed
    :
    CREATE VIEW >view_name< AS SELECT
    *** printing the whole DDL ****
    Token number =    nnn, Token = ..
    
    and upon pressing the Enter key shows the unformatted DDL
    in an ISPF edit session.
    

Problem conclusion

  • Problem has been resolved.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI37750

  • Reported component name

    DB2 ADMIN TOOL

  • Reported component ID

    568851500

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-03-25

  • Closed date

    2015-08-27

  • Last modified date

    2015-09-02

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

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

    UI30639 UI30640

Modules/Macros

  •    ADB2PA
    

Fix information

  • Fixed component name

    DB2 ADMIN TOOL

  • Fixed component ID

    568851500

Applicable component levels

  • RA20 PSY UI30639

       UP15/08/29 P F508

  • RB10 PSY UI30640

       UP15/08/29 P F508

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":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSCVQTD","label":"IBM Db2 Administration Tool for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
02 September 2015