Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



File status must be checked both while opening and reading the file or only while reading the file..

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

File status must be checked both while opening and reading the file or only while reading the file..

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

Post New Answer

More COBOL Interview Questions

How to recover a deleted source physical file from library?

1 Answers   HCL,


What is 88 level used for ?

2 Answers  


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

0 Answers  






01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name

5 Answers   TCS,


what is a zoned decimal data type and how it will be stored?

2 Answers   IBM,


given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1

5 Answers   Broadridge, TCS,


Define REDEFINE clause and Is it possible to have the redefine clause anywhere in the working storage section for a data name?

3 Answers  


what is the result of the following? DIVIDE A INTO B GIVING C. a.C=A/B b.the reminder of B/A is stored in C c.C=B/A d.the reminder of A/B is stored in C

3 Answers   TCS,


What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?

8 Answers   Arigo Infotech, IBM,


should I use Go back in the main program ? Yes we can use Go back in main program as well.

2 Answers   Xansa,






Categories