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 is the difference between CS and RR isolation levels?

1 Answers  


What is a Resource Control Table(RCT)? Describe its characteristics.

3 Answers  


How do u achieve record level locking in DB2 versions when record level locking is not allowed?

2 Answers   IBM,


how can u retrieve the data from null values using applicaion program.

3 Answers   TCS,


what is rebinding ?

1 Answers   IBM,


Could anyone clearly explain the diference between sub query and correlated sub query?

3 Answers  


Can SQL statements/queries be included in a copybook?

2 Answers  


Is the primary key a clustered index?

0 Answers  


What is meant by the attachment facility?

3 Answers  


What is the picture clause of null indicator variable?

0 Answers  


What is lock escalation in db2?

0 Answers  


What are the three types of page locks that can be held?

1 Answers  


Categories