Hello,
When we use index and when we use subscipt in a COBOL program?
When we use index and when we use subscipt?
-
- Registered Member
- Posts: 15
- Joined: Wed Dec 18, 2013 11:19 pm
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: When we use index and when we use subscipt?
You cannot use indexes without specifying INDEXED BY on the table definition. So the first rule of thumb is that if you don't have INDEXED BY, you are using subscripts. In general, indexes and subscripts can be used as the programmer wants but there are exceptions. If your program uses SEARCH ALL, your program will require indexes and not subscripts for that statement.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: When we use index and when we use subscipt?
Search this forum. You will find longer discussion on the subject.
-
- Registered Member
- Posts: 15
- Joined: Wed Dec 18, 2013 11:19 pm
Re: When we use index and when we use subscipt?
Thanks Robert.
I read on other online reference a similar statement and the question I've is - if we're not using SEARCH ALL -- index and subscript are just same, theortically?If your program uses SEARCH ALL, your program will require indexes and not subscripts for that statement.
-
- Registered Member
- Posts: 15
- Joined: Wed Dec 18, 2013 11:19 pm
Re: When we use index and when we use subscipt?
Thanks looked at other topic too and got more to learn.William Collins wrote:Search this forum. You will find longer discussion on the subject.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute