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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why would you use find and get rather than to obtain?

687


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

857


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

666


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

897






Define cobol?

862


What is the usage of comp fields in cobol?

658


Explain the configuration section of a cobol program with examples of syntax.

659


how do you reference the rrds file formats from cobol programs

800


What is perform what is varying?

709


In COBOL programming, what is PERFORM? What is VARYING?

672


How arrays can be defined in COBOL?

663


What are the cobol coding sheets?

664


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

712