Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

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




812
views
asked mar August 3, 2014 03:08 AM  

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


           

1 Answers



 
answered By Mswami   0  

Sl #

Subscript

Index

1

Working Storage item

Internal Item – No need to declare it.

2

It means occurrence

It means displacement

3

Occurrence, in turn translated to displacement to access elements and so slower than INDEX access.

Faster and efficient.

4

It can be used in any arithmetic operations or for display.

It cannot be used for arithmetic operation or for display purpose.

5

Subscripts can be modified by any arithmetic statement.

INDEX can only be modified with SET, SEARCH and PERFORM statements.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert