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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How arrays can be defined in COBOL?

665


example for sub strings ? and refernce modifications whit output pls

1846


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

686


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

677


What is the compute verb? How is it used?

662






how do you reference the printer file formats from cobol programs

667


Can we change the password using ALTER? anyone tried and changed?

1549


how do you reference the esds vsam file formats from cobol programs

634


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

1717


Define cobol?

866


What is the difference between PIC 9.99 and 9v99 in COBOL?

735


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5379


What is report-item in COBOL?

711


how to refer the data field?

1812


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2724