IBM Support

IT15461: 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 fixed if next.

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:                                              *
    * See SYSROUTE APAR to see where this is addressed             *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IT15461

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A50

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-05-25

  • Closed date

    2017-06-05

  • Last modified date

    2017-06-05

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

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

    IT20871

Fix information

Applicable component levels

  • RA50 PSN

       UP

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

Document Information

Modified date:
05 June 2017