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.
See this idea on ideas.ibm.com
Hi,
We study the transition from the Db2 preprocessor to the Db2 coprocessor integrated into the COBOL compiler.
We come across cases of programs that use hosts-variables which are file record areas.
The Db2 preprocessor simply emits a warning and the compilation proceeds (afterwards the developer is responsible for any errors at runtime): DSNH310I W
DSNH310I W DSNHSMUD LINE 408 COL 28 COBOL HOST VARIABLE "E12L-DCJYDT" WAS DECLARED IN FILE SECTION
DSNH310I W DSNHSMUD LINE 408 COL 45 COBOL HOST VARIABLE "E12L-DCJYFI" WAS DECLARED IN FILE SECTION
DSNH310I W DSNHSMUD LINE 409 COL 42 COBOL HOST VARIABLE "E12L-PEGL00" WAS DECLARED IN FILE SECTION
The Db2 coprocessor blocks compilation by issuing a severe level message: IGYPS0231-S
430 IGYPS0231-S SQL host variable "E12L-DCJYDT" was defined in the "FILE SECTION". The statement was discarded.
430 IGYPS0231-S SQL host variable "E12L-DCJYFI" was defined in the "FILE SECTION". The statement was discarded.
431 IGYPS0231-S SQL host variable "E12L-PEGL00" was defined in the "FILE SECTION". The statement was discarded.
601 IGYPS0226-E DSNH504I DSNHSMUD LINE 601 COL 22 CURSOR "JW-CURSOR" WAS NOT DECLARED
We can already see a different behavior about severity level between the preprocessor and the Db2 coprocessor.
But is it fundamentally justified to make a severe error?
With SQLDA management induced by the coprocessor, the memory addresses of the host-variables are recalculated before each access, so a priori no risk of error?
Unlike the operation of the preprocessor which declares as many SQLDAs as SQL accesses and which by default only calculates the addresses of the hosts-variables once during the first SQL access.
The severe error level therefore does not seem justified, and a warning level as the preprocessor did would seem sufficient.
It remains possible to modify the severity level of the IGYPS0231 message, by setting up an MSGEXIT, but it would seem more appropriate that it be a warning level, identical to the preprocessor, and leave the possibility of worsening the level by an MSGEXIT.
Idea priority | Low |
By clicking the "Post Comment" or "Submit Idea" button, you are agreeing to the IBM Ideas Portal Terms of Use.
Do not place IBM confidential, company confidential, or personal information into any field.
Hi Denis, apologies for the delay in our response. After investigating this issue with the Db2 team, it turns out that the COBOL coprocessor is inline with the Db2 documentation and that the IGYPS0231-S error is valid. It is the Db2 preprocessor warning that would need to be changed from a warning to an error. However, talking to the Db2 team, they do not have plans on changing the warning to an error.
Here is the part of the Db2 annual that we are following, in the Application Programming and SQL Guide:
Host variables and host variable arrays in COBOL
You must explicitly declare all host variables and host variable arrays used in SQL statements in the WORKING-STORAGE SECTION or LINKAGE SECTION of your program’s DATA DIVISION. You must explicitly declare each host variable and host variable array before using them in an SQL statement.
As a result, this Idea is being rejected since the COBOL behavior is accurate according to the Db2 documentation.
Hi Denis, thanks for the attachment. We are currently investigating it.
Hi Denis, can you please provide the source code that leads to the co-processor error for us to have a look at? Thanks.
This Idea is being reviewed further.