IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cobol Index/Subscript


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Manto Jaha

New User


Joined: 26 Jun 2021
Posts: 3
Location: India

PostPosted: Sat Jun 26, 2021 4:35 pm
Reply with quote

I know indexes are faster than subscripts, but is there any specific benefit/scenario where I must prefer using Subscript over indexes.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2025
Location: USA

PostPosted: Sat Jun 26, 2021 7:07 pm
Reply with quote

Please, give two examples:
1) how do you plan to use indexes?
2) how do you plan to use subscripts?

This is more than enough explanation to your question; it would be very, very easy to find such answer by yourself, in a few seconds.
Indexes vs Subscripts

P.S.
Based on your question I guess that in your specific case it doesnโ€™t make any difference if you used indexes, or subscripts.
Back to top
View user's profile Send private message
Manto Jaha

New User


Joined: 26 Jun 2021
Posts: 3
Location: India

PostPosted: Sun Jun 27, 2021 6:20 am
Reply with quote

Hi Sergeyken,

All the searches I did only told the differences between Indexes and Subscript. Or else benefits of using indexes as it is faster to access data.

What I am looking for is: What are benefits of using "Subscripts over Indexes".

I just want to know maybe a couple of scenarios where a programmer would prefer using subscript over index.

Ofcourse this is a personal choice of a programmer but knowing indexes are faster why would anyone go for subscript rather than indexes.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Sun Jun 27, 2021 10:32 am
Reply with quote

Welcome!
Apart from all other differences, here is one you want to consider, You can not pass index via linkage to any other programs while the other does.
Moved to Student Forum.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2025
Location: USA

PostPosted: Sun Jun 27, 2021 11:29 pm
Reply with quote

In my previous reference all benefits and drawback are clearly listed, for indexes, and subscripts.

The choice depends 99% on your programโ€™s design, rather than on performance issues. You refused to clarify any details of your case, so no abstract advice can be expected on theoretical โ€œbenefitsโ€.
Back to top
View user's profile Send private message
Manto Jaha

New User


Joined: 26 Jun 2021
Posts: 3
Location: India

PostPosted: Fri Jul 02, 2021 5:03 am
Reply with quote

Thank you Rohit !!! ๐Ÿ‘๐Ÿผ๐Ÿ‘๐Ÿผ๐Ÿ‘๐Ÿผ

@sergeyken: I do not have any "case" for which I could provide details. I am looking for example scenarios where one would prefer using subscript instead of Indexes.
The link you provided or any other site as well only lists definition differences or else benefits of using indexes over subscript while what I was looking for is just opposite of that.

Got 1 example scenario from Rohit !! ๐Ÿ‘๐Ÿผ๐Ÿ‘๐Ÿผ
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top