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 Not under consideration
Workspace COBOL Compilers
Categories z/OS
Created by Guest
Created on Jan 6, 2023

Introducing Local Working Storage (Valid only inside a Section)

Hi, it would be great, if COBOL would allow local variables which would be defined into a COBOL section and are valid only in this COBOL Section. This would bring a huge benefit making COBOL programs much more structured and reducing the working storage section to a minimum. It would alos help refactoring big COBOL programs. I know that COBOL allows to write nested COBOL programs with its "local variables" but this technic is not helpful, when we have COBOL programs with 100+ sections.

Regards

Guido

 

Idea priority Medium
  • Guest
    Reply
    |
    Mar 14, 2023

    I hope you don't mean SECTION, literally. I have been campaigning to deprecate and eventually eliminate SECTIONs from the Procedure Division completely. So many bugs have been caused by programmers who don't know the difference between performing a SECTION and performing a Paragraph. Paragraphs are all that is needed, I would not vote for any enhancement that requires the use of SECTIONs.

  • Admin
    Basil Kanneth
    Reply
    |
    Mar 14, 2023

    This Idea was discussed internally. Nested COBOL programs is the suggested recommendation to achieve this sort of functionality. Any other change that we would implement would still require users to modify/change their existing code. If changes to user code are required either way, we suggest changing it to use nested programs.

    1 reply
  • Guest
    Reply
    |
    Mar 6, 2023

    As a PL/I programmer as well as COBOL, let me also suggest that the word DECLARE, or a simple DCL should be enough for the commpiler to recognize this is a variable declaration. For example, starting in Column 8 (assuming full-line statemenst will not have been emplemented before this is actioned)

    DCL iCount Pic s9(9) Binary value 0.

    If you need a structure, you code a "1" in front of the variable. Otherwise a "77" is assumed for DCL

    Do we really need a LOCAL-STORAGE SECTION?


  • Guest
    Reply
    |
    Feb 9, 2023

    Such a great idea. Would be a huge Improvement and would reduce a lot of bugs.

  • Admin
    Basil Kanneth
    Reply
    |
    Feb 6, 2023

    This idea is being investigated further.