cobopt File

System-wide default options are defined in the file $COBDIR/etc/cobopt. This is the file the cob command reads when first invoked. Each line of this text file corresponds to one of the following formats:

[set environment-variable=value]
[options] ...
[cobextn: .ext [.ext] ... ]

where the parameters are:

environment-variable
Any one of the environment variables supported by the COBOL system.
value
The value to which to set the environment variable.
options
Either one cob option or a group of cob options comprising one or more cob flags.
.ext
A filename extension that, in addition to the standard ones of .cob, .cbl, or .CBL, denotes a file that cob should treat as a COBOL source file. The extension must begin with a period, and if more than one is specified on one line they must be separated by a space or tab character. You can use more than one cobextn line.

If a line does not begin with set or cobextn:, it is taken as an options line.

Note:

The contents of the file $COBDIR/etc/cobopt affect the operation of COBOL for all users using the same $COBDIR; you should alter the file only after careful consideration of the implications.

Example

The $COBDIR/etc/cobopt file contains:

cobextn: .AD  .FD 
-N "nobound" -C ans85

The cob command line specifies:

cob -u a.FD b.AD

In the above example, the cob command passes the COBOL source files a.FD and b.AD to the syntax-check phase of the Compiler to be translated, under the ANS85 directive, into intermediate code. The intermediate code is then passed in turn to the Compiler's generate phase to be translated, under the NOBOUND directive, into generated code.