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
The frequent programming error of forgetting to set an index before a SEARCH is not being detected by INITCHECK. In the following example program, the index U150-ACT-IND-IDX is erroneously not set before the SEARCH U150-TRANX-ACT-IND-DATA line. With the INITCHECK compiler option in effect, it is not detecting this programming error where the U150-ACT-IND-IDX index is used before it is set.
PROGRAM-ID. TESTPROG.
DATA DIVISION.
LOCAL-STORAGE SECTION.
01 GROUP-A.
10 U150-TRANX-ACT-IND-DATA
OCCURS 16 TIMES INDEXED BY U150-ACT-IND-IDX.
15 U150-ACT-IND PIC X VALUE 'A'.
PROCEDURE DIVISION.
AA000-MAINLINE SECTION.
SEARCH U150-TRANX-ACT-IND-DATA
WHEN U150-ACT-IND(U150-ACT-IND-IDX) = 'A'
CONTINUE
END-SEARCH.
GOBACK.
END PROGRAM TESTPROG.
INITCHECK currently doesn't catch the index being used before it is set because it considers there is a reference to the index that could possibly initialize it. Specifically, in the SEARCH statement, it generates a loop:
1) Read U150-ACT-IND-IDX
2) Check the current position in U150-ACT-IND - the WHEN clause (reads U150-ACT-IND-IDX)
3) Increment U150-ACT-IND-IDX
4) Jump to top of loop
In the above loop, since U150-ACT-IND-IDX is initialized in step 3, it is also initialized in step 4. And since step 4 can loop back to step 1, it cannot assume that it is uninitialized at any time it gets to step 1.
-------------------------------
A suggestion - perhaps the compiler could consider the step "1) We read U150-ACT-IND-IDX" as two separate steps 1a and 1b i.e. 1a being the first iteration of the loop and 1b being the target of the step "4) Jump to top of loop". Then INITCHECK could detect the recurring programming error of forgetting to set an index before a SEARCH, because the index would not be set before step 1a. It would only be set before step 1b.
Idea priority | Medium |
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.
This RFE is being accepted and will be updated once put into plan.