File status must be checked both while opening and reading
the file or only while reading the file?
Answer Posted / 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 |
Post New Answer View All Answers
How do define dynamic array in cobol.
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
How do you differentiate between cobol and cobol-ii?
How many sections are there in data division in COBOL?
What are the access modes of START statement?
How do u write test cases?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
how do you reference the fixed unblock file formats from cobol programs
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
Differentiate between structured cobol programming and object-oriented cobol programming.
What is amode(24)?
For rewrite, why is it mandatory that file needs to be opened?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
How can you get the ksds file records into your cobol program?
How do you define a variable of comp-1 and comp-2?