Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Cobol - Indexes.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Dec 01, 2010 4:36 pm    Post subject: Cobol - Indexes.
Reply with quote

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
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Wed Dec 01, 2010 4:58 pm    Post subject: Reply to: Cobol - Indexes.
Reply with quote

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. icon_wink.gif

Indices are necessary if you intend on using COBOL Verbs SEARCH and SEARCH ALL.

Bill
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 01, 2010 9:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help - DB2 Dynamic SQL Program e... NikhilGuptaGaya DB2 0 Sat Jun 23, 2018 1:58 pm
This topic is locked: you cannot edit posts or make replies. Issue in suppressing leading zeros &a... Vijay_Sirisha COBOL Programming 21 Thu Jun 07, 2018 8:01 pm
No new posts VBS to VB in COBOL and JCL srajendran2 COBOL Programming 12 Fri Jun 01, 2018 3:04 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us