i declare a Table as OCCURS 2000 TIMES.If the input file
has more than 2000 records will the COBOL program fail?
Answer Posted / prem
Occur clause is a kind of an array which holds the data of
simalar type in a particular record.
Ex: If we define an occur clause which hold the marks of a
particular student scored in 3 subjects. The code for this
would be as mentioned below
01 Student.
02 Name PIC X(20).
02 MARK OCCURS 3 times PIC 9(03).
So, For a Student "A" marks would be stored in MARK[1], MARK
[2], MARK[3], for "B" MARK[2], MARK[2], MARK[2] likes wise.
In a record format it would be displayed as below
A___________________052060080
B___________________060068070
Total length of the record is 20 + (3*3) = 29
This code will process n number of records no matter what
is the size of occur clause but if the length of the
records is beyond 29 then only the job will abend.
I hope this answers your query.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
what is difference between cobol and cobol/400
) what is the difference between AID and HANDLE AID?
Can you please let me know the centre name of INS certification in Kolkata.
Mention the guidelines to write a structured cobol program?
Define static linking and dynamic linking.
What are the different rules for performing sort operation?
What is the difference between comp and comp-3 usage?
Name some of the examples of COBOl 11?
how to convert the recors form vsam file to db2 table tru file aid
) how do u code after getting data?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
What is the LINKAGE SECTION used in COBOL?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad