i declare a Table as OCCURS 2000 TIMES.If the input file
has more than 2000 records will the COBOL program fail?
Answer Posted / giri
Veena, as far as I knw, An OCCURS clause is used to
indicate the repeated occurrences of items of the same
format in a structure. It is nothing to do with the number
of records in the file. As per your question the filed
which you declare in the table occurs 2000 times. And this
is not the number of record. So your program will read all
the records in the input file. You can display any
occurance of the field like FIELD-NAME(1998) will result in
the value stored in that position, i mean to say 1998th
occurance. When you try to read beyond 2000,the program
will abend with SOC4. I hope I have cleared your doubt!
Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is inspect in cobol ?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
How do you differentiate between cobol and cobol-ii?
Which division and paragraphs are mandatory for a COBOL program?
Explain how you can characterize tables in cobol?
Write the code implementing the perform … varying.
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
Which is not true about evaluate statement
Define cobol?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
What is perform what is varying?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What guidelines should be followed to write a structured cobol prgm?
What is a scope terminator give example?
Define static linking and dynamic linking.