IBM Support

PH29543: Users of ENTERPRISE COBOL 6.3 compiling with OPT(1|2) where the programs contain IF or EVALUATE statements

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • PROBLEM DESCRIPTION: The compiler may incorrectly remove the
    comparison and the code path that would execute when the
    condition is
    matched, instead forcing execution to
    continue on
    the code path when the
    data
    item matches none of the constant
    values.
    
    USERS AFFECTED: Users of Enterprise COBOL 6.x compiling
    with OPT(1|2) where the programs contain IF
    or EVALUATE
    statements that compare a
    single
    data item to several constant
    values where
    the constants and data item are at most
    four bytes
    long, the data item has a known
    value at the point of
    comparison, and that
    value matches one of the constants being
    compared. This may also occur if the
    comparison is within a
    paragraph that is
    PERFORMed, the paragraph is inlined, and
    shortly before the PERFORM statement, the
    data item is assigned
    a value matching one
    of the constants being compared.
    
    KNOWN IMPACT:
    The compiler incorrectly removes code, leading to indeterminate
    incorrect behaviour
    

Local fix

  • BYPASS/CIRCUMVENTION:
    WORKAROUND/CIRCUMVENTION: Compile with OPT(0), or possibly with
    NOINLINE.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 6.3 compiling      *
    *                 with OPT(1|2) where the programs contain IF  *
    *                 or EVALUATE statements that compare a        *
    *                 single                                       *
    *                 data item to several constant values where   *
    *                 the constants and data item are at most      *
    *                 four bytes long, the data item has a known   *
    *                 value at the point of comparison, and that   *
    *                 value matches one of the constants being     *
    *                 compared. This may also occur if the         *
    *                 comparison is within a paragraph that is     *
    *                 PERFORMed, the paragraph is inlined, and     *
    *                 shortly before the PERFORM statement, the    *
    *                 data item is assigned a value matching one   *
    *                 of the constants being compared.             *
    ****************************************************************
    * PROBLEM DESCRIPTION: The compiler may incorrectly remove the *
    *                      comparison and the code path that       *
    *                      would execute when the condition is     *
    *                      matched, instead forcing execution to   *
    *                      continue on the code path when the      *
    *                      data                                    *
    *                      item matches none of the constant       *
    *                      values.                                 *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF                       *
    ****************************************************************
    When comparing the known value of the data item to the known
    constant values, the compiler was comparing up to 32 bits of
    data as a 64-bit compare. If the leftmost bit of the data item
    is 1, the 32-bit value was expanded to 64 bits by setting the
    leftmost 32 bits to 1 (that is, x'FFFFFFFF'), while when the
    constants were expanded to 64 bits, the leftmost 32 bits were
    all set to 0 (x'00000000'). The compiler then compared these
    two values, and as the leftmost 32 bits in each didn't match,
    the compiler incorrectly concluded that the data item didn't
    match any of the values to which it was being compared.
    

Problem conclusion

  • The compiler was fixed to compare 32-bit constants as 32 bits,
    instead of expanding to 64 bits.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH29543

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    630

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-09-15

  • Closed date

    2020-09-16

  • Last modified date

    2020-10-02

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

    PH28786

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

Modules/Macros

  • IGY8RWTU IGYCASMB IGYCCBE  IGYCCCRT IGYCCICS IGYCCSRV IGYCDGEN
    IGYCDIAG IGYCDMAP IGYCEN$0 IGYCEN$1 IGYCEN$2 IGYCEN$3 IGYCEN$4
    IGYCEN$5 IGYCEN$8 IGYCEN$D IGYCEN$R IGYCFGEN IGYCFREE IGYCINIT
    IGYCJA$0 IGYCJA$1 IGYCJA$2 IGYCJA$3 IGYCJA$4 IGYCJA$5 IGYCJA$8
    IGYCJA$D IGYCJA$R IGYCLIBR IGYCLSTR IGYCLVL0 IGYCLVL1 IGYCLVL2
    IGYCLVL3 IGYCLVL8 IGYCMALL IGYCOB2  IGYCOPI  IGYCOSCN IGYCPGEN
    IGYCRCTL IGYCRDPR IGYCRDSC IGYCREAL IGYCRWT  IGYCSCAN IGYCSIMD
    IGYCUE$0 IGYCUE$1 IGYCUE$2 IGYCUE$3 IGYCUE$4 IGYCUE$5 IGYCUE$8
    IGYCUE$D IGYCUE$R IGYCXREF IGYDRV   IGYEQCWI IGYMSGE  IGYMSGK
    IGYMSGT  IGYQCBE  IGYQSPLT IGYZQEN6 IGYZQENU IGYZQJP6 IGYZQJPN
    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655EC600

Applicable component levels

  • R630 PSY UI71591

       UP20/09/27 P F009

  • R631 PSY UI71592

       UP20/09/26 P F009

  • R632 PSY UI71593

       UP20/09/26 P F009

  • R63H PSY UI71594

       UP20/09/26 P F009

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"630","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
12 December 2023