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 db2 400?
Why PS file called Physical seqential file?How to sore data in sequential file and ESDS file? What is the use of DBRM,PLAN,package and Collection.
what are the SQL codes u freequently got?
how do we solve soc 7 and soc4 ?
What is a thread?
What is the max length of sqlca?
What is difference between isnull and coalesce?
what is a plan and how do you refer the plan in the program?
how to fetch multiple records without using cursor
While creating a table, by mistake you have given size of one field as 10. But as per requirement size should be 8. What is your next step?
Discuss about db2 bind?
How to rename a table in DB2 ?