IBM Support

IT36235: PRECOMPILER STRIPS C STYLE COMMENTS FROM SQL, CANNOT USE INLINEDOPTIMIZATION GUIDELINES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The trouble is that the precompiler strips C-style comments from
    the SQL. Therefore, OPTIMIZATION guidelines in the form of
    c-style comments cannot be used. So given this statement
    
           DECLARE c_sale CURSOR FOR SELECT * FROM t1 left join t2
    /*<OPTGUIDELINES> <HSJOIN> <TBSCAN TABLE='T1'/> <TBSCAN
    TABLE='T2'/> </HSJOIN> </OPTGUIDELINES>*/;
    
    The actual statement sent to the compiler is just "SELECT * FROM
    t1 left join t2".  All embedded C-style comments can be
    preserved since our SQL compiler already handles them since
    v8.2.  Currently, given this statement:
    
      EXEC SQL select count(*) into :result from  -- line comment
         /*comment 1*/sysibm.sysdummy1 /* comment2 */;
    
    The compiler currently sees:
    
    10976   data DB2 UDB aps precompiler svc db2CompileSql api
    (3.3.31.159.3.32)
            pid 15793 tid 140296211830528 cpid 14 node 0 probe 32
            bytes 108
    
            Data1   (PD_TYPE_STRINGN,100) String with size:
            select count(*) into :       from
    sysibm.sysdummy1
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * N/A                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to 11.5.6 or higher                                  *
    ****************************************************************
    

Problem conclusion

  • See Error Description
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT36235

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B50

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-03-15

  • Closed date

    2021-07-26

  • Last modified date

    2021-07-26

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

    IT36074

  • 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

  • RB50 PSY

       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.5","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 December 2021