What is the difference between a subscript and an index in
a table definition?

Answers were Sorted based on User's Feedback



What is the difference between a subscript and an index in a table definition?..

Answer / mftech

Subscript is the occurance number in the arrary of element.
Fr e.g., an array has only one itme that repeats for 20
times, in order to refer to 10th itme in this array, you
can say ITEM(20). This '20' can be replaced by a WS
variable having value = 20.

Index: It is the displacement from the begining. if you
remember, when we use Index in a loop, then we do not code
Move 2 to WS-INDEX. We have to code. We need to set the
index to zero and then increament.

Is This Answer Correct ?    7 Yes 0 No

What is the difference between a subscript and an index in a table definition?..

Answer / satheesh gova

subscript specifies the no of occurances of a table or
array where as index specifies the displacement of a
table,subscript is working storage variable but index is not
working storage section variable,by using arithematic
operations we can increment and decrement the value of
subscript,but by using SET verb we can get it in index.

Is This Answer Correct ?    3 Yes 0 No

What is the difference between a subscript and an index in a table definition?..

Answer / srinu

Subscript is the occurance number in the arrary of element.
Fr e.g., an array has only one itme that repeats for 20
times, in order to refer to 10th itme in this array, you
can say ITEM(20). This '20' can be replaced by a WS
variable having value = 20.

Index: It is the displacement from the begining. if you
remember, when we use Index in a loop, then we do not code
Move 2 to WS-INDEX. We have to code. We need to set the
index to zero and then increament.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More COBOL Interview Questions

How do define Dymanic array in cobol how do u define single demensional arry and multidymensional arry in ur cobol.

4 Answers   Cap Gemini,


consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end

3 Answers   TCS,


what is call by value and call by reference ?

3 Answers   Infosys, ITC Indian Tobacco Company,


What is the difference between binary search and sequential search?

0 Answers  


If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??

4 Answers   Accenture,






What are subroutines ? and how do we pass data to the sub routines?

2 Answers   Xansa,


what is the difference between Plan & package?

1 Answers   IBM,


IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.

2 Answers   ADNA, CSC,


what is the minimum number of lines a Cobol program should have to successfully compile and run

11 Answers   ABC, Societe Generale,


What are VS COBOL 11 special features?

1 Answers  


How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.

1 Answers  


How will you find the currepted records in a file

2 Answers  


Categories