a. Can the OPTIONAL clause in COBOL only be coded for input
files?
b. If it is coded for files opened in OUTPUT, I-O or EXTEND
mode, will it give a compilation error?
c. If there are no compilation errors and if such files are
not coded in the JCL, will the OPEN statement run fine when
these files are opened?
d. How will a WRITE statement work for the above files?
Answer Posted / kb
An OPTIONAL file is being opened as EXTEND or I-O. Optional
files are files that are not necessarily present each time
the program is run. You can define files opened in INPUT,
I-O, or EXTEND mode as optional by using the SELECT OPTIONAL
phrase in the FILE-CONTROL paragraph.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Define cobol?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is the difference between PIC 9.99 and PIC9v99?
For rewrite, why is it mandatory that file needs to be opened?
What is a report item?
What is the Purpose of Pointer in the string?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
In which area will you utilize 88 level items in cobol?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
How do you reference the fixed block file formats from cobol programs
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?