IBM Support

PI59354: SUPPORT DYNAMIC STORAGE IN COBOL (PIC X(1) LINKAGE SECTION ITEMS WITH REFERENCE MODIFICATION AND TABLE ODO OVERLAYS)

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as duplicate of another APAR.

Error description

  • In earlier versions of COBOL, customer source frequently
    handled dynamically sized pieces of storage by using a PIC X(1)
    linkage section data-item and then reading or writing beyond
    the bounds of that array.  This APAR will add this type of
    support to COBOL V5 to make the behavior consistent with COBOL
    V4.
    
    LINKAGE Example:
    
    WORKING-STORAGE SECTION.
    01  wrk-len                 PIC s9(08) binary.
    LINKAGE SECTION.
    01  L-String1               PIC X(1).
    01  L-String2               PIC X(1).
    PROCEDURE DIVISION.
    0000-MAIN.
        MOVE 1000 TO wrk-len
        MOVE L-String1(1:wrk-len) TO L-String2(1:wrk-len)
    
    Behavior difference:  COBOL V4 moves 1000 bytes.  COBOL V5
    moves 232 bytes due to differing instructions.
    
    TABLE ODO Example:
    WORKING-STORAGE SECTION.
    01  CONTROLVAR PIC 9(5) BINARY.
    01  MYCONTAINER.
        02  MYTABLE.
            03 TBL OCCURS 0 TO 1 TIMES DEPENDING ON CONTROLVAR.
               05 MYFIELD PIC X(1).
        02 DUMMY PIC X(300).
    PROCEDURE DIVISION.
        MOVE 1 TO CONTROLVAR
        MOVE ALL 'Z' TO DUMMY
        DISPLAY DUMMY          <= Contains all Z's
        MOVE 300 TO CONTROLVAR
        MOVE ALL 'M' TO MYTABLE <= MYTABLE has 1 byte of M's in V4
        DISPLAY MYTABLE
        MOVE 1 TO CONTROLVAR
        DISPLAY DUMMY   <= DUMMY HAS 299 BYTES OF M's in V4.
    
    Behavior difference:  COBOL V4 overlays storage following
    MYTABLE exactly as expected byte for byte.  COBOL V5 handles
    the overlay differently such that the storage results differ
    from COBOL V4.
    

Local fix

Problem summary

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    PI59354

  • Reported component name

    ENT COBOL FOR Z

  • Reported component ID

    5655W3200

  • Reported release

    520

  • Status

    CLOSED DUB

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-03-17

  • Closed date

    2016-03-22

  • Last modified date

    2016-03-23

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

    PI57812

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

Fix information

Applicable component levels

[{"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":"520","Edition":"","Line of Business":{"code":"LOB17","label":"Mainframe TPS"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"520","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
23 March 2016