How do you define a table/array in COBOL?

Answer Posted / thaya

To define a table use occur clause ..

01 WT-TABLE-DATA.
03 WT-TAB-PARM OCCURS 99 TIMES
INDEXED BY WT-TAB-IDX.
05 WT-TAB-PARMREC.
10 TBL-PARM-UPDT-CD PIC X(02).
10 FILLER PIC X(01).
10 TBL-STATUS-FLAG PIC X(01).
10 FILLER PIC X(76).

we can use "depending on" keyword with occure clause to
limit our occurences in output.

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the printer file formats from cobol programs

774


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

1970


What are the rules of the move verb?

819


Can we change the password using ALTER? anyone tried and changed?

1634


What is the difference between external and global variables in COBOL?

915






What rules are to be followed while using the corresponding options?

729


how do you reference the ksds vsam file formats from cobol programs

759


Explain about different table spaces.

747


What rules are followed by the search verb.

721


What is redefines clause in COBOL?

929


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1054


What are the different types of condition in cobol and write their forms.

754


How do u write test cases?

1720


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1720


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

846