IBM Z and LinuxONE Languages

Languages

Languages

Broad range of supported development languages and tools allows to transform software delivery practices.

 View Only
Expand all | Collapse all

COBOL - PH09682: ZONEDATA(NOPFD) DIFFERING RESULTS ON A MOVE WITH INVALID DATA - example?

  • 1.  COBOL - PH09682: ZONEDATA(NOPFD) DIFFERING RESULTS ON A MOVE WITH INVALID DATA - example?

    Posted Wed February 12, 2020 10:59 AM
    At our site we are planning on installing the fix for APAR PH09682.

    The APAR states:
    <main role="main" aria-label="">
    • the compiler doesn't guarantee the same behaviour as older
      versions for invalid data, the new instructions produced
      different results when non-numeric data was used
    </main>

    We have programs that were compiled using COBOL V6.2 with ZONEDATA(NOPFD) before this fix was applied.
    I want to know if we are at risk but I don't know what to look for.
    Can someone give me an example of a statement that produces these "different results"?

    ------------------------------
    René Beurskens
    ------------------------------


  • 2.  RE: COBOL - PH09682: ZONEDATA(NOPFD) DIFFERING RESULTS ON A MOVE WITH INVALID DATA - example?

    Posted Wed February 19, 2020 01:04 PM
    Hi René,

    The APAR states that the problem occurs when moving non-numeric data from an alphanumeric sender to a numeric-edited receiver. Here's an example:

    01 ALNUM-SENDER PIC X(5).
    01 NUM-EDIT-RECEIVER PIC -9(4).
    
    MOVE '    -1' TO ALNUM-SENDER.
    MOVE ALNUM-SENDER TO NUM-EDIT-RECEIVER.
    
    DISPLAY "SENDER=" ALNUM-SENDER.
    DISPLAY "RECEIVER=" NUM-EDIT-RECEIVER.
    
    
    
    Before the fix to V6.2, this would display:
    SENDER=   -1
    RECEIVER=   -1
    
    After the fix, this would display:
    SENDER=   -1
    RECEIVER= 0001
    ​


    ------------------------------
    Mike Chase
    ------------------------------