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 can I get the negative sign while deduct high value from low value

1998


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

977


What is the Purpose of Pointer in the string?

814


What is the compute verb? How is it used?

845


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

962


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17503


How to print 10 to 1 if the input have only 10 digit number?

1021


Write the code implementing the perform … varying.

817


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

930


A table has two indexes defined. Which one will be used by the SEARCH?

1005


What is the difference between external and global variables in COBOL?

1037


What is a SSRANGE and NOSSRANGE?

1101


What is amode(31)

903


what are decleratives in cobol?

1992


Give some examples of command terminators?

934