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 / sandy
OPTIONAL clause can be specified for files opened INPUT,
OUTPUT, I-O and EXTEND modes. It will not give any
compilation error.
If we do not have DD statements for such files during
execution, the following file status code would be obtained
when we open the file.
INPUT (JCL RC = 0)
------
Open statement will give file status of '05'. Open is
successfule but file is not present.
EXTEND (JCL RC = 0)
------
Open statement give file status of '96'. No DDNAME present.
I-O (JCL RC = 0)
------
Open statement give file status of '96'. No DDNAME present.
WRITE (JCL SOC4 ABEND)
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
how do you define single dimensional array and multidimensional array in your 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
What is difference between static and dynamic call in cobol?
What are the pertinent COBOL
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What are the cobol coding sheets?
Give some examples of command terminators?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
example for sub strings ? and refernce modifications whit output pls
What is link edit in cobol?
What is a SSRANGE and NOSSRANGE?
what are decleratives in cobol?
Mention the guidelines to write a structured cobol program?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Describe the cobol database components?