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 to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

704


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

662


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

639


What is perform what is varying?

701


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

681






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

1840


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

701


) how do u code after getting data?

1578


Which Search verb is equivalent to PERFORM…VARYING?

681


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

672


Which mode is used to operate the sequential file?

658


What is Pic 9v99 Indicates in COBOL?

722


) what is the difference between AID and HANDLE AID?

1630


What is the difference between comp and comp-3?

694


Explain how to differentiate call by context by comparing it to other calls?

683