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

what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8165


) how do u code after getting data?

1580


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

684


) How do u handle errors in BMS macro

1510


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

892






How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2730


Are you comfortable in cobol or jcl?

643


What is the difference between next sentence and continue in cobol programing language?

710


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

743


Why did you choose to work with ibm mainframe cobol programming?

631


What is the difference between comp and comp-3?

700


Explain how you can characterize tables in cobol?

638


What is the utilization of copybook in cobol?

657


How arrays can be defined in COBOL?

663


What is the local-storage section?

681