What is the different between index and subscript?

Answers were Sorted based on User's Feedback



What is the different between index and subscript?..

Answer / ash

Subscript - refers to the array occurance

Index - refers to the byte position/displacement of the
occurance from the start of the array

Is This Answer Correct ?    4 Yes 0 No

What is the different between index and subscript?..

Answer / sharath-hyd

INDEX is Displacement position of array data name.
Subscript is No. of occurenceof array data name.

Is This Answer Correct ?    4 Yes 0 No

What is the different between index and subscript?..

Answer / raja

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.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More COBOL Interview Questions

In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?

1 Answers  


how you will define variables length in cobol.

3 Answers   Temenos,


Where the Plan is located in CICS-DB2

2 Answers   IBM,


i have variable record in the 5th, i want to sort from 5th filed ? how ?

2 Answers   TCS,


What is a report item?

0 Answers  






How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.

1 Answers   IBM,


is it possible to rename 01 level?

4 Answers  


if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


what are the steps to sort in a cobol program?

2 Answers   Patni,


Categories