what is subscript in cobol?give realtime example?

Answer Posted / jagan kumar

it is a number of occrances of array data name. subscript is
coded in working-storage section with separate variable.
example.
01 g1.
02 ele pic x(3) occurs 10 times.
01 i pic 99.
procedure division.
perform varying i from 1 by 1 until i > 10
accept ele(i)
display ele(i)
end-perform.
in this is case i is a subscript variable

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

848


Write some characteristics of cobol as means of business language.

857


Whats the difference between search & search ALL?

5898


What is report-item in COBOL?

901


Write down the divisions of cobol program?

854


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

989


how to convert the recors form vsam file to db2 table tru file aid

2984


What is the difference between PIC 9.99 and PIC9v99?

1041


What are the different data types in cobol?

1060


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

974


What are the cobol coding sheets?

874


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2354


How do you define a variable of comp-1 and comp-2?

918


What is a report item?

914


how can i see junk values in dclgen or in hostvariable of comp ?

2760