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
how to access the file from prodution from changeman tool and to submit a file to production
What is the difference between comp and comp-3?
What are the different rules to perform a Search?
Name the divisions, which are available in a cobol program?
What is the difference between Global and External Variables?
What is a SSRANGE and NOSSRANGE?
What is amode(24)?
What is the difference between PIC 9.99 and PIC9v99?
Which division and paragraphs are mandatory for a COBOL program?
how do you reference the variable unblock file formats from cobol programs
What is length is cobol?
What is cobol?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Write a program that uses move corresponding.
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?