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 |
wht is packed decimal in cobol
can we read records in a file from botom to top. if possible how can we read
What are the functions like c or c++ in cobol?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?
can internal sort be applied to sort ksds files?
hi, can you ppl tell me, how to check whether the rewrite we gave for the ksds file is successful or not in the program.? i gave rewrite, the rewrite code is executing and maxcc=0 but updation doenot happen in the file?
How to convert bunch of words in a line to relvant ASCII values?
what is the difference between PA & PF keys?
What is static and dynamic call in cobol?
which one is better among static call and dynamic call?