Skip to Main Content
IBM Z Software


This portal is to open public enhancement requests against IBM Z Software products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace COBOL Compilers
Categories z/OS
Created by Guest
Created on Apr 20, 2023

Option to prevent inadvertent use of LINKAGE-SECTION data items prior to establishing addressability

In a COBOL program, the LINKAGE SECTION is used to describe data structures that are made available to this program from another program or method.  Addressability to these data structures are established in a variety of ways, such as via references in the USING phrase of the PROCEDURE DIVISION header.

If a LINKAGE SECTION data item is used by a COBOL program before the correct addressability to the intended data structure is established, each LINKAGE SECTION 01-level data data item is actually mapped to address zero which is the IHAPSA (Prefixed Save Area) control block owned by the z/OS operating system.

Especially with data structures that are not passed to a COBOL program by the USING phrase of the PROCEDURE DIVISION header, it is easy to inadvertently reference a LINKAGE SECTION data item before addressability to the intended data structure has been established.  While "write" references will fail, a "read" reference to such a data item will result in data from the IHAPSA control block being returned to the COBOL statement.  Such COBOL coding errors can be quite subtle and hard for developers to find and fix.

Similar to the COBOL SSRANGE compiler option that generates code that checks for out-of-range storage references, the suggestion is that there be a new COBOL compiler option that generates code to disallow (fail/abend) any reference to a LINKAGE SECTION data item prior to addressability being established.  If a COBOL program intends to reference the z/OS IHAPSA control block, that program should do so by overtly setting a zero address POINTER value to that LINKAGE SECTION data item and not using this default mapping behavior of an uninitialized LINKAGE SECTION data item.

Idea priority High
  • Admin
    Basil Kanneth
    Reply
    |
    Jul 17, 2023

    This Idea is being accepted and will be updated again once put into plan.

  • Admin
    Basil Kanneth
    Reply
    |
    May 11, 2023

    Hi Brian,

    Thank you for submitting this Idea.


    We are reviewing it and we are leaning towards to implementing a compile time option that will generate instructions to check for linkage items with an address section of 0 at runtime.

    Would that be acceptable?

    3 replies
  • Guest
    Reply
    |
    Apr 21, 2023

    An important use case for the option is to flag instances where the linkage section structure contains one or more ODO items resident in the group itself. Such references will fail during ALLOCATE or CICS GETMAIN either immediately (eg. out of memory) or some time later (eg. 0C4) that's not clearly connected to the allocation per se, as the ODO items will come from low memory during a LENGTH OF calculation.

    Such cases have increased with z/OS 2.5, which changed location zero from 000A0000 to 00000000 among other changes to the PSA.

    2 replies