IBM Support

PI72927: ERRONEOUS JAVA GENERATION WITH AN SQL CASE STATEMENT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A SQL select clause containing a field like "case when
    BRA_BRANCH_NUMBER < '200' then 'smaller than 200' else '' end as
    STATE".
    
    The Generated Java for the applicable case expression does not
    include the STATE field which then returns incorrect results ie:
    
    com.ibm.javart.sql.SqlHostVars.getStringExact(
    $rec.BRA_005fBRANCH_005fNUMBER, $results, 1, $columns,
    ezeProgram );
    
    In this scenario two expressions are expected ie
    com.ibm.javart.sql.SqlHostVars.getStringExact(
    $rec.BRA_005fBRANCH_005fNUMBER, $results, 1, $columns,
    ezeProgram );
    com.ibm.javart.sql.SqlHostVars.getStringExact( $rec.STATE,
    $results, 2, $columns, ezeProgram );
    
    This has been identified as a Compiler defect by development.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users that code SQL statements with 2 single quotes          *
    * immediately in a row, without any text between them          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Improper SQL can be generated if 2 single quotes are given   *
    * without any text between them, in a SQL statement.           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • The parser has been updated to properly handle this situation.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI72927

  • Reported component name

    RATL BUS DEV

  • Reported component ID

    5724S5000

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-11-29

  • Closed date

    2019-01-17

  • Last modified date

    2019-01-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

    RATL BUS DEV

  • Fixed component ID

    5724S5000

Applicable component levels

  • R901 PSY

       UP

  • R911 PSY

       UP

  • R950 PSY

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"950","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
18 October 2021