where can we use index and subscript ? with example ?
Answers were Sorted based on User's Feedback
Answer / tej
In addition to the above,
subscript is like a working storage variable
abc pic 999.
Using index the search for the data is faster since it gives
the object location(displacement) directly.
Subscript can be modified by ADD,SUBTRACT etc
Index modification is UP BY,DOWN BY
and yeah this q should have been in cobol section ;)
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / lu
Subscript refers to the array occurrence while index is the
displacement (in no of
bytes) from the beginning of the array. An index can only
be modified using PERFORM, SEARCH & SET.
Need to have index for a table in order to use SEARCH,
SEARCH ALL.
This is cobol, not DB2....
Is This Answer Correct ? | 4 Yes | 2 No |
What is the use of value function?
What is coalesce in db2?
How do you select a row using indexes in db2?
What is deadlock?
What is SPUFI?
How to get the ddl of a table in db2?
What is access path in db2?
Why might full image copies be faster to implement than an incremental image copy?
What are some characteristics of columns that benefit from indexes?
How to define the a field which accepts value till 99999.99 in db2
why we go for SPUFI for creating tables or for sql queries?
Is schema the same as database?