Page 1 of 1
When we use index and when we use subscipt?
Posted: Tue Dec 24, 2013 5:46 pm
by Sushil Vaidya
Hello,
When we use index and when we use subscipt in a COBOL program?
Re: When we use index and when we use subscipt?
Posted: Wed Dec 25, 2013 8:23 am
by Robert Sample
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.
Re: When we use index and when we use subscipt?
Posted: Wed Dec 25, 2013 4:38 pm
by William Collins
Search this forum. You will find longer discussion on the subject.
Re: When we use index and when we use subscipt?
Posted: Thu Dec 26, 2013 1:53 pm
by Sushil Vaidya
Thanks Robert.
If your program uses SEARCH ALL, your program will require indexes and not subscripts for that statement.
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?
Re: When we use index and when we use subscipt?
Posted: Thu Dec 26, 2013 2:03 pm
by Sushil Vaidya
William Collins wrote:Search this forum. You will find longer discussion on the subject.
Thanks looked at other topic too and got more to learn.