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

1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1605


What is the utilization of copybook in cobol?

650


how do you reference the variable unblock file formats from cobol programs

738


Explain how you can characterize tables in cobol?

636


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1693






How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2722


What are different data types in cobol?

683


How you can characterize tables in cobol?

709


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

700


i need a small 3d program using inline and outline.

1629


what is difference between cobol and cobol/400

21551


What is rmode(24)

676


how can i see junk values in dclgen or in hostvariable of comp ?

2536


What is the difference between structured cobol programming and object alternativelyiented cobol?

747