IBM Support

IT20871: DB21034E OCCURS FOR "SELECT" SQL STATEMENTS STARTING WITH BLOCK COMMENTS THROUGH CLP

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When a block comment containing slash sign(s) '/' is inserted at
    the beginning of a statement, the following SELECT SQL fails
    with DB2 CLP.
    
    $ db2 -tvf jt_bad.sql
    /***************************************************************
    **************** Script Name : Comment Block Date :
    23/02/2016
    ****************************************************************
    ****************/ select  1 from sysibm.sysdummy1
    DB21034E  The command was processed as an SQL statement because
    it was not a
    valid Command Line Processor command.  During SQL processing it
    returned:
    SQL0084N  An EXECUTE IMMEDIATE statement contains a SELECT or
    VALUES
    statement.  SQLSTATE=42612
    

Local fix

  • You can do one of the following options as a workaround.
    
    1? Remove the slash '/' inside comment block
    
    $ db2 -tvf jt_good_1.sql
    /***************************************************************
    **************** Script Name : Comment Block Date :
    23-02-2016
    ****************************************************************
    ****************/ select  1 from sysibm.sysdummy1
    
    1
    -----------
              1
    
      1 record(s) selected.
    
    2? Insert another statement before the SELECT query
    
    $ db2 -tvf jt_good_2.sql
    /***************************************************************
    **************** Script Name : Comment Block Date :
    23/02/2016
    ****************************************************************
    ****************/ set current schema = 'JIANTANG'
    DB20000I  The SQL command completed successfully.
    
    select  1 from sysibm.sysdummy1
    
    1
    -----------
              1
    
      1 record(s) selected.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 11.1 Mod 2 Fix Pack 2 or higher               *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 11.1 Mod 2 Fix Pack 2
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT20871

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-06-05

  • Closed date

    2017-06-23

  • Last modified date

    2017-06-23

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

    IT15461

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 June 2020