IBM Support

PH48843: S0C4 EXCEPTION MAY OCCUR WITH WRITE AFTER ADVANCING CLAUSE ON WRITE WHEN WRITING PAST EOV ON QSAM FILE FOR AMODE64

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A s0c4 can occur in COBOL run-time routine IGZXSPA when writing
    
    past the end of volume of a file that is coded with WRITE AFTER
    
    
    ADVANCING.  Also, the file is defined with a File Status
    clause,
    but the file status is not checked.
    

Local fix

  • Do not write past the end of volume.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 6.3 and later      *
    *                 releases running AMODE 64 programs writing   *
    *                 to QSAM files with a WRITE AFTER ADVANCING   *
    *                 clause and FILE STATUS clause specified.     *
    ****************************************************************
    * PROBLEM DESCRIPTION: When the program writes to a QSAM file  *
    *                      past end of volume, an 0C4 abend        *
    *                      may occur in COBOL run-time routine     *
    *                      IGZQSPA and the program terminates.     *
    ****************************************************************
    * RECOMMENDATION: Install the provided PTF.                    *
    ****************************************************************
    The COBOL run-time routine IGZQSPA attempts to refer to
    an invalid buffer address assigned when writing past end of
    volume.
    
    COB0603T/K COB0604T/K
    

Problem conclusion

  • The COBOL Runtime logic has been fixed.
    
    The file status is set with 34 when writing past end of
    volume with a WRITE AFTER ADVANCING clause on a QSAM file
    specified with the FILE STATUS clause in the file definition.
    
    In order for the COBOL program to continue, it needs to take
    appropriate action to handle the file status 34 as described in
    
    COBOL Programming Guide
    - Chapter 9. Processing QSAM Files
    -- Handling errors in QSAM files
    
    "If you use the FILE STATUS clause, be sure to check the key
    and take appropriate action based on its value. If you do not
    check the key, your program might continue, but the results
    will probably not be what you expected."
    
    The meaning of 'File status 34' can be found from
    
    COBOL Language Reference
    - Chapter 26. Procedure division structure
    -- Statement operations
    --- Common processing facilities
    ----- File status key
    
    "Permanent error condition
    
    A permanent error exists because of a boundary violation;
    an attempt was made to write beyond the externally defined
    boundaries of a sequential file."
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH48843

  • 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-22

  • 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:

    UI82579 UI82580 UI82584

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