How do you define a table/array in COBOL?

Answer Posted / anil prajapati

Table/array can be defined in cobol by using occurs with
times clause

like
working-=storage section.
01 tab1 value 'anilkumarprajapati'.
03 tab2 pic x(3) occurs 6 times indexed by i.
procedure division.

display tab2(i).
stop run.

output will be dsiplayed like

ani
lku
....

Is This Answer Correct ?    23 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we get current date from system with century in COBOL?

807


What is difference between static and dynamic call in cobol?

779


Name the sections present in data division.

701


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


How do you reference the fixed block file formats from cobol programs

709






What is the difference between Global and External Variables?

666


Explain about different table spaces.

651


What are the cobol coding sheets?

666


What is link edit in cobol?

774


Explain what you understand by passing by value.

704


How do get the result of your program directly on your pc?

1885


What are the different rules for performing sort operation?

763


Difference between cobol and cobol-ii?

714


What guidelines should be followed to write a structured cobol prgm?

673


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

759