IBM Support

PH30656: COBOL 5+ uses only the 9 low order digits of a USAGE DISPLAY VSAM relative record key

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The largest possible relative record number is 4294967295 (4G)
    which has 10 digits. When doing file positioning with the START
    statement, the COBOL 5+ runtime converts a PIC 9(>9) USAGE
    DISPLAY relative record key to binary for the access method, but
    erroneously uses only the low order 9 digits. This can result
    in the subsequent READ returning the wrong record in large
    files.
    
    This is not an issue for the COBOL 4- runtime.
    

Local fix

  • Use a binary (PIC 9(9) COMP-5) relative record key, and move the
    PIC 9(>9) item into it before the START statement.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of Enterprise COBOL 5 and later        *
    *                 releases running programs that read          *
    *                 VSAM RRDS(Relative Record Data set),         *
    *                 using Relative Record Number(RRN) whose      *
    *                 type is a ZONED DECIMAL data item.           *
    ****************************************************************
    * PROBLEM DESCRIPTION: An incorrect record is read by the      *
    *                      specified RRN.                          *
    ****************************************************************
    * RECOMMENDATION: Apply the provided PTF.                      *
    ****************************************************************
    When the RRN is specified by a data item of ZONED DECIMAL
    in the RELATIVE KEY IS clause, and the RRN value is more
    than 9 digits, only the last 9 digits of the value are
    used during VSAM RRDS processing.
    
    For example, given the following snippets,
    only 234567890 in WS-KEY, as opposed to 1234567890,
    is used during the START processing.
    
     SELECT RAWDATA-DD
     ASSIGN TO RAWDATA
     ORGANIZATION IS RELATIVE
     ACCESS MODE IS DYNAMIC
     RELATIVE KEY IS WS-KEY
     ...
    
     01 WS-KEY PIC 9(11).
    
     PROCEDURE DIVISION.
     ...
     MOVE 01234567890 TO WS-KEY
     START RAWDATA-DD KEY IS EQUAL TO WS-KEY
     ...
     READ RAWDATA-DD.
    
     COB0501T/K COB0502T/K COB0601T/K COB0602T/K COB0603T/K
    

Problem conclusion

  • COBOL Runtime incorrectly truncates the RRN value during
    VSAM processing. COBOL Runtime has been corrected to address
    the problem.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH30656

  • Reported component name

    LE ENT COBOL LI

  • Reported component ID

    568819812

  • Reported release

    7C0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-10-16

  • Closed date

    2020-11-23

  • Last modified date

    2020-12-01

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

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

Modules/Macros

  • IGZCEV4  IGZCMGEN IGZCMGJA IGZCMGUE IGZLLIBV IGZXAPI  IGZXCDA
    IGZXCMDT IGZXD24  IGZXDMR  IGZXFCDT IGZXFDT  IGZXFDTM IGZXFTM
    IGZXIFDT IGZXLPIO IGZXLPKA IGZXLPKB IGZXLPKC IGZXLPKD IGZXLPKE
    IGZXLPKF IGZXLPKG IGZXPK2  IGZXSFFT IGZXSPMT IGZXTDTM IGZXTYDD
    IGZXTYMD
    

Fix information

  • Fixed component name

    LE ENT COBOL LI

  • Fixed component ID

    568819812

Applicable component levels

  • R7B0 PSY UI72716

       UP20/11/28 P F011

  • R7BJ PSY UI72717

       UP20/11/28 P F011

  • R7C0 PSY UI72718

       UP20/11/28 P F011

  • R7CJ PSY UI72719

       UP20/11/28 P F011

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.

[{"Line of Business":{"code":"LOB17","label":"Mainframe TPS"},"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":"7C0"}]

Document Information

Modified date:
02 December 2020