Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the different open modes available in cobol?

1180


Give some examples of command terminators?

1247


What is the LINKAGE SECTION used in COBOL?

1522


What guidelines should be followed to write a structured cobol prgm?

1144


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2422


What is rmode(any) ?

1252


Describe the cobol database components?

1166


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2119


How do define dynamic array in cobol.

1117


IF I mention stop run in CICS what happens?

2362


Write a cobol program making use of the redefine clause.

1158


how do you reference the esds vsam file formats from cobol programs

1202


What is the difference between external and global variables in COBOL?

1449


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

6558


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1158