IBM Support

IT36074: 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

  • I'm opening this defect in response to RFE 109499:
    
    https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&
    CR_ID=109499
    
    Opening for 11.1.3.3 but this is not a commitment, I just want a
    defect to track this item.
    
    The trouble is that the precompiler strips C style comments from
    the SQL, 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
    
    All comments can be preserved (including the line comment
    provided the terminating newline is not removed).  But for the
    purposes of this RFE, all that is strictly required is to
    preserve any trailing C-style comment
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * all                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to 11.1.4.7                                          *
    ****************************************************************
    

Problem conclusion

  • Upgrade to 11.1.4.7
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT36074

  • 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-03-01

  • 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:

    IT36235

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:
04 May 2022