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 a DB2 catalog?
What is the significance of DB2 free space and what parameters control it?
what is + sign and -ve sign for sql code ?
In db2, how do you insert multiple rows in 1 query using a.) Cursors, b.) Normal query?? Give syntax for both.
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
When do you specify the isolation level? How?
How is a typical db2 batch pgm executed?
What is referential integrity?
How can i install db2 9.x on AIX based system..? plz reply the detailed steps involved....?
What is meant by explain?
What does runstats do in db2?
What parameters are used to control the free space in DB2?