1.

What is the difference between index and subscript in COBOL?

Answer»
SubscriptIndex
Means the number of occurrences of an arrayThis means the number of displacement POSITIONS of an array.
Always declared in the working-storage section.It need not be declared INSIDE the working-storage section.
It is initialized by the MOVE statementIt is initialized by the SET operator.
It is comparatively slow to accessIt is FASTER than Subscript
Value is incremented USING the ADD operator.Here, the value is incremented using the MOVE operator
Not necessary to declare INDEXED BY clauses.Necessary to declare INDEXED BY and any other clauses in Index.


Discussion

No Comment Found