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
Created by Guest
Created on Sep 29, 2020

Enterprise Cobol - empty SECTION and statement in SECTION without PARAGRAPH

We see unexpected behavior of the Cobol compiler when using SECTION in PROCEDURE DIVISION.
This for the V4R2 and V6R2 versions.

Case 1

When a SECTION is empty, SECTION declaration followed immediately by another SECTION declaration, the compiler issues an IGYPS2015-I information message.
However, according to the Language Reference, this is allowed.

000012 MAIN-FN SECTION.
000013 SECOND SECTION.

== 000013 ==> IGYPS2015-I The paragraph or section prior to paragraph or section "SECOND" did not
contain any statements.

This construction (empty SECTION) can be useful to mark the end of scope of a "PERFORM section" by declaring an empty SECTION after the performed SECTION.
Optionally, the presence of an EXIT instruction can be imposed so that the SECTION is not empty, without requiring the presence of a PARAGRAPH between the declaration of the SECTION and the EXIT instruction.

Case 2

When an instruction is directly defined in a SECTION, without introducing a PARAGRAPH, no message is sent by the compiler.

According to the Language Reference manual, the presence of instructions directly at SECTION level, without PARAGRAPH, would not be allowed.

The ISO standard allows the presence of instruction directly in a SECTION, without PARAGRAPH.

000012 MAIN-FN SECTION.
000013 Display 'MAIN-FN'.
000014 SECOND SECTION.
000015 Display 'Second'
000016.
000017 SECOND-FN SECTION.
000018 Display 'SECOND-FN'.
000019 END PROGRAM TestSect.

These cases do not seem to be identified in the "A. IBM Extensions" chapter of the Language Reference.

The rules of dependencies between SECTION, PARAGRAPH and instructions should be clarified.

Our opinion :
- an instruction must not be able to be declared directly in a SECTION, except the EXIT instruction which in this case must be the only instruction of the SECTION.
- a SECTION containing only the EXIT statement, without PARAGRAPH, must be allowed.

Idea priority Low
  • Guest
    Reply
    |
    Nov 5, 2020

    The proposed solution only answers part of the problem.

  • Guest
    Reply
    |
    Nov 5, 2020

    Note: The implementation of the EXIT statement in the IBM compiler does not conform to the ISO standard.

  • Guest
    Reply
    |
    Nov 2, 2020

    Hi, we are rejecting this RFE because you can achieve the same feature by using the MSGEXIT.

    Here is what you need to add to the sample IGYMSGXT MSGEXIT:

    ********************************************************************
    * Change severity of message 2015 to suppress the message *
    *****************************************************************
    When(2015)
    Compute EXIT-USER-SEV = -1

  • Guest
    Reply
    |
    Sep 29, 2020

    Attachment (Description): Format of PROCEDURE DIVISION in ISO Cobol

  • Guest
    Reply
    |
    Sep 29, 2020

    Attachment (Description): Format of PROCEDURE DIVISION in IBM Enterprise Cobol Language Reference