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

what is difference between cobol and cobol/400

21547


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

648


What is perform what is varying?

695


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)?

619


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

693






How to use the same COBOL program in Batch and CICS on lines? explain with an example

1907


How many sections are there in data division in COBOL?

674


What are the pertinent COBOL commands?

2617


Explain about different table spaces.

642


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5049


What are 77 levels used for?

650


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

639


Write the code to count the sum of n natural numbers.

696


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1831


What is the difference between Call and a Link?

692