File status must be checked both while opening and reading
the file or only while reading the file?
Answers were Sorted based on User's Feedback
Answer / nagaraj ramamoorthy
As a good programming practice, it will be good if you
handle/include all possible error combination in the
program. so the file status must be checked in both cases.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / raj
At the time of reading is enough. There is only one case of
getting abend at the time of opening i.e, If that file
doesn't exists.But in general the programmer doesn't open
any file if that one is not exists so there will be no
negative effect if we insert the File status check Opening
file.
| Is This Answer Correct ? | 2 Yes | 1 No |
Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?
12 Answers T systems, Tech Mahindra,
when COMP-3 is preferrable?
wht happens if we dnt give scope terminator ?
What are ISOLATION LEVELS? Where do we need to specify them?
how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please
What are the divisions in a cobol program?
What is the problem of ordered sequential files access?
What is difference between static and dynamic call in cobol?
how to display the dataset information?
What is the difference between comp and comp-3 usage?
What is an in line PERFORM? When would you use it? Anything else to say about it?
I have a File that has duplicate records. I need only those records that occur more than thrice.?