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 Global and External Variables?
Describe the cobol database components?
i need a small 3d program using inline and outline.
Can you please let me know the centre name of INS certification in Kolkata.
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?
how do you reference the variable block file formats from cobol programs
What is the difference between Call and a Link?
Whats the difference between search & search ALL?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
What is the usage of comp fields in cobol?
What is Pic 9v99 Indicates in COBOL?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
Write a cobol program making use of the redefine clause.