IBM Support

PH30261: DB2 ADMIN TOOL DDL/GEN COMMAND ON OBJECT CONTAINING CAST CLAUSE GENERATES INCORRECT DDL FOR THE CAST

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DDL/GEN command on an object (such as a trigger or a view)
    may generate incorrect DDL for a CAST clause on a string that
    spans multiple lines.
    
    Depending on the positioning and length of the value in the CAST
    clause, the CAST clause itself and/or any concatenation
    characters may be omitted during DDL generation.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of the Db2 Administration Tool for     *
    *                 z/OS reverse engineering (GEN) function.     *
    ****************************************************************
    * PROBLEM DESCRIPTION: The CAST keyword and concatenation      *
    *                      characters are missing when DDL is      *
    *                      generated.                              *
    ****************************************************************
    When an object, such as a trigger or view, uses the CAST
    function on a string that spans multiple lines, the CAST
    keyword and any concatenation characters might be missing.
    
    Example body used during CREATE TRIGGER:
    BEGIN ATOMIC INSERT INTO TBADCO01((SELECT CAST('STR1 '
    || ' STR2' AS CHAR( 10 )), CAST('STR1 ' || ' STR2' AS
    CHAR( 10)), CAST('STR1 ' || ' STR2' AS CHAR( 10)),
    CAST('FIRST_PART_STR0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ'||
    'THE SECOND PART STR0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    AS DECIMAL( 5, 4)),
                     CAST('STR1 ' || ' STR2' AS DECIMAL( 5, 4))
                     FROM "SYSIBM".SYSDUMMY1
                     WHERE NOT EXISTS(
                       SELECT 1
                         FROM TBADCO01 A
                           WHERE A.SCHOOL_ID = '100'))) ;
    
    GEN produces the following:
    BEGIN ATOMIC INSERT INTO TBADCO01
    ((SELECT CAST('STR1 ' || ' STR2' AS
    CHAR( 10)), CAST('STR1 ' || ' STR2' AS CHAR( 10)),
    CAST('STR1 ' || ' STR2' AS CHAR( 10)),
    'FIRST_PART_STR0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    'THE SECOND PART STR0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    AS DECIMAL( 5, 4)),CAST('STR1 ' || ' STR2' AS DECIMAL( 5, 4))
       FROM "SYSIBM".SYSDUMMY1 WHERE NOT EXISTS(
       SELECT 1
    FROM TBADCO01 A
     WHERE A.SCHOOL_ID = '100'))
          ) ;
    

Problem conclusion

  • The problem has been resolved.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH30261

  • 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

    2020-10-07

  • Closed date

    2021-01-07

  • Last modified date

    2021-02-01

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

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

    UI73388

Modules/Macros

  • ADB2FMT
    

Fix information

  • Fixed component name

    DB2 ADMIN TOOL

  • Fixed component ID

    568851500

Applicable component levels

  • RC10 PSY UI73388

       UP21/02/01 P F101

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":"SSCVQTD","label":"IBM Db2 Administration Tool for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1.0"}]

Document Information

Modified date:
12 February 2021