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
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Write some characteristics of cobol as means of business language.
Mention the guidelines to write a structured cobol program?
In COBOL programming, what is PERFORM? What is VARYING?
Define static linking and dynamic linking.
What is the usage of comp fields in cobol?
Difference between array and sub-script ?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
) How do u handle errors in BMS macro
When is inspect verb is used in cobol?
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.
What is a scope terminator give example?
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
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
How arrays can be defined in COBOL?