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 Plan is created while executing the query using SPUFI?
What are the benefits of using the db2 database?
how to resolve -811 error. give clear explination
What is PRIME TABLE and what are the uses of it
What is load replace in db2?
what is the difference between declaring the cursor in WS section and Procedure division?
WHAT IS MEANT BY COMMIT COMMAND?
we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expanded if we write 1) copy 2) include one question about dclgen.. Is it mandatory to use declare table in dclgen.. I think no...but it will be used by the precompiler to validate the table name,column name etc.., can one clear my doubt ..is it necessary to include declare table or not?
What is the use of runstats in db2?
Define predicate?
Plan is an executable form of sql statements,But what exactly resides inside a Plan. what are the details inside Plan.
Parm value passed is PARM=(10,20). how do code linkage section and how would you add these two passes values and show result in cobol program.