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
Created by Guest
Created on Aug 24, 2021

Enterprise COBOL V6+ - Provide a way to identify source lines discarded by conditional compilation

We have made extensive use of conditional compilation to provide a COBOL development framework.

If the development framework is easy to use, the result is a compilation listing filled with lines of source code commented out by conditional compilation.

To date, nothing makes it possible to distinguish a real comment line, introduced by the developer in his source code, or in the COPYBOOKs of the framework, compared to the source lines commented out by the conditional compilation.

In the end, reading the compilation listing becomes incomprehensible (and it is the compilation listing that is used by our debugging tools).

We want to have a way to identify the source lines discarded by conditional compilation:
- either by having a compilation option which prevents them from appearing in the compilation listing (best solution)
- either by introducing "header" and "trailer" before and after the discarded source lines, for example in the form of "==> IGZxxxx" messages, (which will make the compilation listing even less readable).
- either by producing a table of the source lines discarded by the conditional compilation at the end of the compilation listing.
- either not to number the source lines excluded by the conditional compilation
- either inject (optionally) *CONTROL NOSOURCE / *CONTROL SOURCE control cards before and after the source lines excluded by the conditional compilation


The best solution we would hope to be implemented is the first.
The other solutions would allow us to develop a post processing of the compilation listing (possibly by an exit) to physically remove the lines discarded by the conditional compilation of the compilation listing and make it more readable for the developer (reminder: the compilation listing is used by our debugging tools).

========

A difficulty lies in the fact that the line numbers of the source code are used in the references (LIST, OFFSET ...).

A solution to work around this problem is to do a first compilation in MDECK(NOCOMPILE) mode, to produce a source with the lines commented out by the conditional compilation, then to remove these lines from the source code, and finally to launch a real compilation on the new one streamlined source.

We believe this is how the COBOL compiler should work internally.

Idea priority Medium
  • Guest
    Reply
    |
    Oct 14, 2021

    The chosen solution must be compatible with the use of the MDECK(NOCOMPILE) compilation option , i.e. the lines commented out by the conditional compilation must be identifiable (or preferably discarded) in the source written in the SYSMDECK output.

  • Guest
    Reply
    |
    Sep 18, 2021

    This is a valid RFE and is being accepted. It will be updated further once put into plan.

  • Guest
    Reply
    |
    Sep 15, 2021

    We also have trouble to identify those lines. Compilations on different platforms needs sometimes code modifications, so we used conditional compile to allow multiplatform-sourcecode.
    In my opinion there should be a IGY-Message for "some lines were eliminated by ConditionalCompile" and then listed (without line number) the code lines.
    And on next Occurance the same IGY-Message (should be Level 0, not warning, and could be eliminated by message exit).

  • Guest
    Reply
    |
    Aug 27, 2021

    Applying this to debug lines (with debugging mode) would be helpful as well.