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
Can we change the password using ALTER? anyone tried and changed?
Can you please let me know the centre name of INS certification in Kolkata.
Explain how you can characterize tables in cobol?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
I have a File that has duplicate records. I need only those records that occur more than thrice.?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Describe the cobol database components?
What is a SSRANGE and NOSSRANGE?
What is the difference between next sentence and continue in cobol programing language?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What are all the divisions of a COBOL program?
What are literals?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
Write the code implementing the perform … varying.