IBM Support

PH52609: With OPT(1|2), the remainder can be incorrect if operands to a divide are unsigned binary halfwords

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In a DIVIDE dividend BY divisor GIVING quotient REMAINDER
    remain, where the operands are unsigned binary halfwords (PIC
    9(4) COMP-5, or PIC 9(4) BINARY/COMP/COMP-4 with TRUNC(BIN)),
    optimized code may produce the wrong remainder.
    
    Specifically, if bit 0--what would otherwise be the sign bit--of
    the dividend and divisor are mixed, the remainder will be the
    complement of the correct remainder.
    
    Note that the problem context is not one usually seen in COBOL
    code.
    

Local fix

  • Compile with OPT(0)
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 6.2 compiling      *
    *                 programs with OPT(1|2) that contain DIVIDE   *
    *                 REMAINDER statements where the operands are  *
    *                 unsigned COMP-5 and the dividend is larger   *
    *                 than the maximum positive value for a        *
    *                 signed COMP-5 of the same size (e.g. the     *
    *                 divdend is between 32768 and 65535 for a     *
    *                 PIC 9(4) COMP-5).                            *
    ****************************************************************
    * PROBLEM DESCRIPTION: The remainder is incorrect.             *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF                       *
    ****************************************************************
    The compiler was incorrectly treating the dividend as signed,
    interpreting the bits in the dividend as a negative number.
    

Problem conclusion

  • The compiler was fixed to correctly treat the dividend as
    unsigned when doing COMP-5 division.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH52609

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655EC600

  • Reported release

    620

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2023-02-14

  • Closed date

    2023-02-14

  • Last modified date

    2023-03-01

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

    PH51837

  • 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 IGYCLIBH IGYCLIBO IGYCLIBR IGYCLSTR IGYCLVL0
    IGYCLVL1 IGYCLVL2 IGYCLVL3 IGYCLVL8 IGYCMALL 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  IGYZQDRV IGYZQENU IGYZQJPN
    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655EC600

Applicable component levels

  • R620 PSY UI90523

       UP23/02/22 P F302

  • R621 PSY UI90524

       UP23/02/22 P F302

  • R622 PSY UI90525

       UP23/02/22 P F302

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":"620","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
12 December 2023