What is the difference between a subscript and an index in
a table definition?

Answers were Sorted based on User's Feedback



What is the difference between a subscript and an index in a table definition?..

Answer / mftech

Subscript is the occurance number in the arrary of element.
Fr e.g., an array has only one itme that repeats for 20
times, in order to refer to 10th itme in this array, you
can say ITEM(20). This '20' can be replaced by a WS
variable having value = 20.

Index: It is the displacement from the begining. if you
remember, when we use Index in a loop, then we do not code
Move 2 to WS-INDEX. We have to code. We need to set the
index to zero and then increament.

Is This Answer Correct ?    7 Yes 0 No

What is the difference between a subscript and an index in a table definition?..

Answer / satheesh gova

subscript specifies the no of occurances of a table or
array where as index specifies the displacement of a
table,subscript is working storage variable but index is not
working storage section variable,by using arithematic
operations we can increment and decrement the value of
subscript,but by using SET verb we can get it in index.

Is This Answer Correct ?    3 Yes 0 No

What is the difference between a subscript and an index in a table definition?..

Answer / srinu

Subscript is the occurance number in the arrary of element.
Fr e.g., an array has only one itme that repeats for 20
times, in order to refer to 10th itme in this array, you
can say ITEM(20). This '20' can be replaced by a WS
variable having value = 20.

Index: It is the displacement from the begining. if you
remember, when we use Index in a loop, then we do not code
Move 2 to WS-INDEX. We have to code. We need to set the
index to zero and then increament.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More COBOL Interview Questions

) How do u handle errors in BMS macro?

0 Answers   IBM,


C1 C2 C3 are three conditions whose TRUTH values are as folloes. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below A:C1 AND(NOT C2) OR C3 B.(NOT C1) OR (NOT C2 AND NOT C3) C.(C1 OR C2)AND C3 D.C1 AND C2 OR C3 given the above information which of the following statements are valid? a.only A,B and C are TRUE b.only A,C and D are TRUE c.A,B,C and D are TRUE d.only C and D are TRUE

1 Answers   TCS,


What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......

3 Answers   BirlaSoft,


What is file status 39 ?

10 Answers   JPMorgan Chase,


What are differences between Static Call and Dynamic Call?

10 Answers   IBM, KBC, Keane India Ltd, Verizon,






have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...

2 Answers   ITC Indian Tobacco Company, PNP, TCS,


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER

7 Answers   Patni,


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

1 Answers   L&T,


What is the default value of DISP for temp datasets

5 Answers   IBM,


In EBCDIC, how would the number 1234 be stored?

2 Answers   TCS,


if a dataset is already created with fixed length but after that i want to change fixed length to variable length then how is it possible

3 Answers   IBM,


Categories