IBM Support

IT38345: DB2 PREP COMMAND FAILS WITH THE ERROR SQL0318N WHEN THE VALUES CLAUSE CONTAINS THE KEYWORD FOR.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The problem is introduced after the multi-row insert/fetch
    feature was delivered.
    
    The issue occurs when the SQL statement has FOR keyword in the
    VALUES clause.
    
    Sample SQL
    
    EXEC SQL
        INSERT INTO T1
        VALUES ( NEXT VALUE FOR NUM_SEQ,
            :var1,
            :var2)
    END-EXEC.
    
    The keyword FOR is wrongly interpreted in this SQL.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Cobol precompiler specific.                                  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 version 11.1 mod 4 fix pack 7                 *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 version 11.1 mod 4 fix pack 7
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT38345

  • 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

    2021-09-12

  • Closed date

    2022-04-17

  • Last modified date

    2022-04-17

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

  • 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

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"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:
03 May 2022