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


Please Help Members By Posting Answers For Below Questions

How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

974


What the difference is between continue and next sentence?

874


Difference between array and sub-script ?

1381


How do we get current date from system with century in COBOL?

1066


Explain how you can characterize tables in cobol?

821


How many bytes S(8) comp field occupy and its maximum value?

1859


What is the difference between Global and External Variables?

931


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2184


What is the default value(s) for an initialize and what keyword allows for an override of the default?

957


how to convert the recors form vsam file to db2 table tru file aid

2981


Can a Search can be done on a table with or without Index?

1055


What do you understand by psb and acb?

846


What is the problem of ordered sequential files access?

908


What are different data types in cobol?

914


How do you differentiate between cobol and cobol-ii?

859