where can we use index and subscript ? with example ?

Answers were Sorted based on User's Feedback



where can we use index and subscript ? with example ?..

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

where can we use index and subscript ? with example ?..

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

where can we use index and subscript ? with example ?..

Answer / shivankoo

The question is where(in which scenario) we use subscript
and where we use index and not what is index and subscript.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB2 Interview Questions

Mention the location where the output received from explain statement is stored.

0 Answers  


What is the difference between SYNONYM and ALIAS?

6 Answers   TCS,


WHAT IS MEANT BY COMMIT COMMAND?

7 Answers   Wipro,


What else is there in the PLAN apart from the access path?

1 Answers  


Is ibm db2 open source?

0 Answers  






What does an outer join do?

1 Answers   CTS,


What is the max length of sqlca?

0 Answers  


What is referential integrity?

5 Answers  


what is Static and dynamic linking

1 Answers   Virtusa,


Can a array declared with an index be displayed(readable format) in spool?

4 Answers   Syntel, UST,


When Can you be sure that a query will return only one row?

4 Answers   IBM,


What is cursor stability?

1 Answers  


Categories