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

What if , we failed to mentioed null indicator in sql select query , that may retrieve null value ?

2 Answers   Cap Gemini,


can any one give the list of some important sql abend codes which r frequently asked in interviews?

2 Answers  


What's the maximum number of volumes that can be added to a STOGROUP?

1 Answers   IBM,


Why might full image copies be faster to implement than an incremental image copy?

4 Answers  


What is performance tuning db2?

0 Answers  






What is the specific need of Plan and..where are the tables in DB2 are physically saved

3 Answers   Infosys,


In cobol+DB2program if the code of cobol program has changed than i have to do precompilation once again?

6 Answers   TCS,


What is image copy?

1 Answers   Virtusa,


When DB2 connection fails, will online program work or give errors.

1 Answers   Virtusa,


How to create a table using embedded sql?

1 Answers  


What is database reorganization?

0 Answers  


What db2 400?

0 Answers  


Categories