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

Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

806


Write some characteristics of cobol as means of business language.

611


Mention the guidelines to write a structured cobol program?

603


In COBOL programming, what is PERFORM? What is VARYING?

665


Define static linking and dynamic linking.

655






What is the usage of comp fields in cobol?

646


Difference between array and sub-script ?

1154


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

407


) How do u handle errors in BMS macro

1498


When is inspect verb is used in cobol?

668


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

1998


What is a scope terminator give example?

650


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2088


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2654


How arrays can be defined in COBOL?

658