Previous Topic Next topic Print topic


System-wide Directives File, cobol.dir

Use a system-wide directives file if you want to permanently override the default value of a directive.

To override one or more directives, create a flat system-wide directives file named cobol.dir, and list the directives in the file. Place cobol.dir in the etc sub-directory of the location specified by the COBDIR environment variable.

Note: If the COBDIR environment variable is not set then the COBOL system acts as if it had been set to the default COBOL system directory.

The Compiler automatically processes the directives in the system-wide directives file. Firstly, it looks for a cobol.dir file in the current directory, and then in the $COBDIR/etc (UNIX) or %COBDIR%\etc (Windows) directory.

Compilation terminates if the Compiler rejects a directive specified on the command line or in a directives file. Therefore, whenever you create or change a cobol.dir file, run a trial compilation and watch for "Rejected" messages at the beginning when the directives are processed.

Previous Topic Next topic Print topic