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).
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:
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 an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
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.
You are targeting your answers too much to the compiler without considering the needs to make it easier for developers to code programs.
The use case was just an example to illustrate the request.
Your answer concerning an alternative to the use case does not answer the substance of the request.
We have investigated this RFE. We recommend using a separate COBOL program (instead of copybooks) and have that called from another COBOL program.
We maintain COBOL standard conformability and portability with other compilers. Implementing this RFE would go against that and as a result, we would need to reject it.
@fswarbrick
From what I read in the ISO COBOL standard drafts, indeed the "Identification Division" header is optional, but apparently not "Environment Division", nor "Data Division", nor "Procedure Division".
On the other hand, the Divisions are optional (there is no obligation to declare the 4 Divisions in the source code), and if the Division is totally absent, then its header is also absent.
On the removal of the division headers, I don't know if that would facilitate or complicate the proposed evolution.
Basically, I have the impression from seeing error messages and bug descriptions in the fix lists, that the IBM COBOL compiler translates the source code into C language before compiling it. However, the C language allows the mixing of data declaration sequences and code declaration sequences, just like assembly language. So I see no obstacle to the COBOL language authorizing it as well, except by wanting to remain imperatively in a very restrictive and penalizing standard ... (which does not bother IBM any more than that when it is in its interest not to follow the standard).
An alternative would be to consider this evolution through the use of "macro".
Instead of using a "COPY" directive, we would use a "MACRO" directive, with exactly the same syntax as the "COPY" directive.
The "MACRO" directive would be declared in a particular section of the source code, probably in the Environment Division, perhaps the "REPOSITORY" section, or a new section to be created.
The contents of the "MACRO" would be distributed in the source code as in the example provided for the "COPY".
IDENTIFICATION DIVISION.
PROGRAM-ID. MYPROG.
*
* Minimal work for developer
*
ENVIRONMENT DIVISION.
REPOSITORY.
*--- the framework -----------------------------------------------
macro FICREAD
replacing ==:DDN:== by ==MYFIC==
==:LRECL:== by ==80==
==:RECORD:== by ==MYRECORD==
.
*-----------------------------------------------------------------
DATA DIVISION.
WORKING-STORAGE SECTION.
01 MYRECORD.
05 MYRECORD-DATA PIC X(80).
PROCEDURE DIVISION.
MAIN.
perform MYFIC-OPEN
perform MYFIC-READ
perform until MYFIC-EOF
display MYFIC-COUNTER MYRECORD-DATA
perform MYFIC-READ
end-perform
perform MYFIC-CLOSE
goback.
Attachment (Use case): COBOL program as understood by compiler
Attachment (Use case): COBOL program after expansion of COPYBOOKs
Attachment (Use case): COBOL program as written by developer
Attachment (Use case): COPYBOOK of framework for use of a sequential file in read mode
It's certainly an interesting thought.
One thing I've pondered about requesting is the elimination of all of the DIVISION labels. I believe the recent COBOL standards actually do make the IDENTIFICATION DIVISION label optional (so programs can start with just PROGRAM-ID, or FUNCTION-ID, or whatever). Would this fit in with your requirement, or would it make your requirement more difficult to implement?