1.

Difference between index and subscript.

Answer»
IndexSubscript
Index represents the number of displacement positions of the array.Subscript is the number of occurrences of the array.
Index does not require a separate declaration. INDEX BY is USED to declare index.Subscript REQUIRES separate declaration with S9(04) COMP in WORKING-STORAGE SECTION.
Helps in FASTER access of data in the table.Is slower in accessing data items.
Uses SET STATEMENT to initialize index.Uses MOVE statement to initialize subscript.
Can DECREASE by using SET DOWN BY statement and SET UP BY statement is used to increase index.ADD statement is used to increase subscript and SUBTRACT is used to decrease it.


Discussion

No Comment Found