What is the difference between index and subscript?

Answer Posted / jkb

Index represents the displacement value of the table entry
from the beginning of the table whereas subscript is the
occurrence number of the table entry.

To calculate the displacement of the table entry from its
beginning when subscript is used takes 16 additional
instructions from the system because of that the usage of
the index is more efficient.

An index can only be modified using PERFORM, SEARCH & SET.
Need to have index for a table in order to use SEARCH,
SEARCH ALL.

Is This Answer Correct ?    25 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

1950


how do you reference the variable unblock file formats from cobol programs

752


What are the pertinent COBOL commands?

2628


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1234


What are declaratives and what are their uses in cobol?

714






What is the difference between goback, stop run and exit program in cobol?

932


What is the difference between a binary search and a sequential search what are the pertinent cobol?

737


Write some characteristics of cobol as means of business language.

623


What is the difference between next sentence and continue in cobol programing language?

712


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1958


What guidelines should be followed to write a structured cobol prgm?

675


Have you used comp and comp-3 in your project? And how?

2012


What is an in line perform? When would you use it? Anything else you wish to say about it.

649


how to access the file from prodution from changeman tool and to submit a file to production

6688


Differentiate between structured cobol programming and object-oriented cobol programming.

669