IBM Support

PH48728: DISPLAY verb max record length differs between COBOL 4.2 and COBOL 5+, may lead to a wrapping of output for AMODE64

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Although the documentation claims a maximum line length of 255
    characters for the DISPLAY verb, the COBOL 4.2 and earlier
    runtime allows for 256 characters in the absence of carriage
    control, while the COBOL 5 and later runtime sets aside one of
    the 255 bytes it allocates for carriage control regardless of
    carriage control being defined or not.
    
    The result is that if a DISPLAY statement outputs 256 bytes, and
    there is no carriage control defined, the output with COBOL 4.2-
    will all be on one line, while under COBOL 5+ the final two
    characters will be on the next line.
    

Local fix

  • None. (The DISPLAY verb is not intended to be used to write
    records, using regular file I/O is recommended.)
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 6.3 and later      *
    *                 releases running AMODE 64 programs which     *
    *                 output more than 254 bytes on a single line  *
    *                 to a fixed block dataset using the COBOL     *
    *                 DISPLAY statement.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION: When the COBOL DISPLAY statement is     *
    *                      used to output more than 254 bytes on   *
    *                      a single line to a fixed block dataset  *
    *                      with a RECORD LENGTH long enough        *
    *                      to contain the desired output,          *
    *                      only the first 254 bytes are written    *
    *                      to a single line and the rest of the    *
    *                      output iscontinued in the following     *
    *                      line.                                   *
    *                                                              *
    *                      For example, COBOL program has          *
    *                                                              *
    *                        01 RECORD260 PIC X(260).              *
    *                        ...                                   *
    *                        DISPLAY RECORD260.                    *
    *                                                              *
    *                      SYSOUT is allocated to a FB dataset     *
    *                      whose RECORD LENGTH (LRECL) is 270.     *
    *                                                              *
    *                      The output mismatches between           *
    *                      COBOL 4.2 and 6.3/later releases.       *
    ****************************************************************
    * RECOMMENDATION: Install the provided PTF.                    *
    ****************************************************************
    With COBOL 4.2, DISPLAY is capable of writing 255 bytes
    to a single line in a fixed block dataset containing printer
    control characters (FBA) and 256 bytes to a fixed block dataset
    without the control character (FB).
    
    COBOL 6.3 and later releases need to match the same DISPLAY
    outputs as COBOL 4.2.
    
    COB0603T/K COB0604T/K
    

Problem conclusion

  • The size of a buffer and internal logic in the COBOL Runtime
    has been changed to match the desired DISPLAY outputs.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH48728

  • Reported component name

    LE ENT COBOL LI

  • Reported component ID

    568819812

  • Reported release

    7D0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-08-16

  • Closed date

    2022-09-27

  • Last modified date

    2022-10-03

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

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

Modules/Macros

  • CELQSG04 CELQV004 IGZQAPI  IGZQCA64 IGZQCDA  IGZQINPL IGZQJNI2
    

Fix information

  • Fixed component name

    LE ENT COBOL LI

  • Fixed component ID

    568819812

Applicable component levels

  • R7B0 PSY UI82579

       UP22/10/01 P F209

  • R7C0 PSY UI82580

       UP22/10/01 P F209

  • R7D0 PSY UI82584

       UP22/10/01 P F209

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

Document Information

Modified date:
03 October 2022