How do you define a table/array in COBOL?

Answer Posted / mojib khan

To define a table using occurs clause..
working -storage section.
01 table.
*for one dimensional array
02 table-name pic size() occurs n times.
03 field1-name pic size.
03 field2-name pic size.
.......
........
........
03 fieldn-name pic size.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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


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

697


Explain about different table spaces.

642


what is search and searchall?what is the diffrence between them?give an best example?

5534


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

624






What is the difference between goback, stop run and exit program in cobol?

914


What is the difference between Global and External Variables?

654


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?

883


What are the different rules of SORT operation?

689


Describe the cobol database components?

672


Difference between cobol and cobol-ii?

698


What do you understand by psb and acb?

659


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5355


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

1872


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

2716