Microsoft KB Archive/33024

[NO]OPTIONAL-FILE Compiler Directive for COBOL Version 3.0

PSS ID Number: Q33024 Article last modified on 04-21-1993

3.00 | 3.00 MS-DOS | OS/2

Summary: The [NO]OPTIONAL-FILE directive causes the compiler to treat all SELECT clauses in files opened for I/O and EXTEND as if they were OPTIONAL. Under ANSI 1985 standard COBOL, SELECT clauses are treated by default as NOOPTIONAL. To ensure complete compatibility with the ANSI 1985 standard you must specify both the ASN85 and the NOOPTIONAL-FILE directive. Please note that NOOPTIONAL-FILE is the default with the MS(2) directive. With all other dialect directives, OPTIONAL-FILE is the default. This means that with the MS(2) directive, files that do not exist when OPENed will not be created. This behavior is different than previous versions of the Microsoft COBOL Compiler.

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.