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

what is the difference b/w level no.01 & level no.77?

3 Answers   HCL,


What are the situations u have used in ur project for Subcript and Index ? 1.if u use Subscript why not Index,why u choose Subscript only? 2.if u use Index why not Subscript,what abt Displacement?

2 Answers   Cap Gemini,


how do u link sub pgm to main pgm ?

2 Answers   TCS,


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?

2 Answers   T systems,


i need a small 3d program using inline and outline.

0 Answers  


I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.

3 Answers   IBM,


Can you please let me know the centre name of INS certification in Kolkata.

0 Answers  


I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest

2 Answers   IBM,


What is ASKTIME, SUSPEND

1 Answers   IBM,


What is redefines clause in COBOL?

0 Answers   B-Ways TecnoSoft,


Categories