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 |
How to resolve -805 error in DB2?
What are the various locking levels available?
What is EXPLAIN?
What do the initials DDL and DML stand for and what is their meaning?
Mention a credible reason why select* is never given preference in an sql program that has been embedded.
What is -904 sql code? How to resolve it?
What are catalog tables in db2?
How can i install db2 9.x on AIX based system..? plz reply the detailed steps involved....?
What is buffer pool?
when i am trying to update a table having 1000 rows. the program abends.how we will come to know the last successful updated row was. we are not using any commit operations
What is the purpose of the DSNC transaction ?
What is access path in db2?