View previous topic :: View next topic
|
Author |
Message |
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
Hi,
I have heard usage of index in cobol can degrage the performance of cobol code.
If a code consists of 4-5 indexes how can we use them to avoid SOC1 and SOC4 error. What other alternatives can be used as the code has to maintain an array of values while doing computation. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Not true, must be a rumour. Indices/Indexes are far more efficient than subscripts, especially when the program is compiled with the OPT compile option.
However, raising a S0C1 and/or S0C4 can happen using either indices/subscripts and is usually a programming bug.
Indices are necessary if you intend on using COBOL Verbs SEARCH and SEARCH ALL.
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I have heard usage of index in cobol can degrage the performance of cobol code. |
Suggest you not use this source of technical informatoin any more. . .
With or without indexes code can be written poorly and thus degrade performance. . .
Properly written code will generate neither oc1 nor oc4 abends. The coder must ensure that the code does not try to reference storage outside the array(s). Thorough testing is the way to ensure the code will work for all possible inputs. . . |
|
Back to top |
|
|
|