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 |
in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......
What is the compute verb? How is it used?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?
How do u find the programs calling the given module, without having doing 3.13 on loadlib/source library?
What is the different between index and subscript?
how do you reference the fixed unblock file formats from cobol programs
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
how to code in cobol while using variable block file?
wht is the difference between goto and perform stmts
01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above