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
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What the difference is between continue and next sentence?
Difference between array and sub-script ?
How do we get current date from system with century in COBOL?
Explain how you can characterize tables in cobol?
How many bytes S(8) comp field occupy and its maximum value?
What is the difference between Global and External Variables?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
how to convert the recors form vsam file to db2 table tru file aid
Can a Search can be done on a table with or without Index?
What do you understand by psb and acb?
What is the problem of ordered sequential files access?
What are different data types in cobol?
How do you differentiate between cobol and cobol-ii?