IBM Support

PH16062: Migration: 9 digit valued S9(8) BINARY to S9(11) PACKED-DECIMAL compare is false, though both fields contain the same value

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The COBOL v4.2 compiler returns true in the noted scenario
    because it fails to truncate the leading digit after conversion
    from binary to decimal for the compare; a 9(8) BINARY item
    should only contain 8 decimal digits.
    

Local fix

  • Make the binary operand COMP-5 to avoid truncation of the 9th
    digit, or redefine it as S9(9) (which doesn't change the item
    size).
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL compiling and      *
    *                 running programs compiled with the           *
    *                 TRUNC(OPT) option where the program          *
    *                 contains a comparison between a binary item  *
    *                 that is overpopulated with respect to its    *
    *                 PIC clause (which is considered an instance  *
    *                 of invalid data) and a packed decimal item   *
    *                 with a greater precision than the binary     *
    *                 item.                                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: Unexpected runtime result for the       *
    *                      comparison.                             *
    *                                                              *
    *                      In versions of the compiler prior to    *
    *                      V5, all bits in the binary item would   *
    *                      be involved in the comparison, whereas  *
    *                      in V5 and later compilers, the          *
    *                      comparison respects the PIC clause of   *
    *                      the binary item.                        *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    ****************************************************************
    The compiler does not guarantee predictable results when invalid
    data is present, but in this particular scenario pre-V5
    versions of the compiler would take into account all bits of
    the binary item regardless of the precision specified in its
    PIC clause.
    

Problem conclusion

  • The compiler was updated to support the pre-V5 behavior of the
    compiler for comparisons between an overpopulated binary item
    and a packed decimal item that has a larger precision than the
    binary item. The new behavior is only available when either
    the ZONEDATA(NOPFD) option or ZONEDATA(MIG) option is in
    effect.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH16062

  • 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

    2019-08-26

  • Closed date

    2019-09-18

  • Last modified date

    2019-11-14

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

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

    PH16554 PH19229

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 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  IGYZQDRV IGYZQENU IGYZQJPN
    

Fix information

  • Fixed component name

    ENT COBOL FOR Z

  • Fixed component ID

    5655EC600

Applicable component levels

  • R620 PSY UI65366

       UP19/09/21 P F909

  • R621 PSY UI65367

       UP19/09/21 P F909

  • R622 PSY UI65368

       UP19/09/21 P F909

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"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"620","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
12 December 2023