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 |
what are decleratives in cobol?
C1 C2 C3 are three conditions whose TRUTH values are as folloes. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below A:C1 AND(NOT C2) OR C3 B.(NOT C1) OR (NOT C2 AND NOT C3) C.(C1 OR C2)AND C3 D.C1 AND C2 OR C3 given the above information which of the following statements are valid? a.only A,B and C are TRUE b.only A,C and D are TRUE c.A,B,C and D are TRUE d.only C and D are TRUE
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)
What is the Purpose of Pointer in the string?
What type of SDLC u followed? Why?
In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.
How include time & date in the report generation in cobol programing?
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?
What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
how to create temporary data set in jcl? what is the use?
3 Answers Cap Gemini, Temenos,
what is internal sort and external sort ? which is preferable ?