Previous Topic Next topic Print topic


COBOPT Environment Variable

The COBOPT environment variable defines the options for the cob command. COBOPT contains options that either supplement or override the system default options defined in $COBDIR/etc/cobopt. COBOPT can also specify the path of a file that contains such options.

The COBOPT definition takes the same form as in the $COBDIR/etc/cobopt file. For example, the following COBOPT definition passes the directives COPYEXT"CPY,cpy" and NOOPTIONAL-FILE to the Compiler's syntax-check phase and the NOBOUND directive to the Compiler's generate phase:

COBOPT='-C "copyext=CPY,cpy nooptional-file" -N "nobound"'

COBOPT can be set to a value that includes several lines by enclosing the entire value in single (') or double (") quotation marks. Under the Bourne shell, the Enter key can be typed to indicate the line-break. Other types of shell might need a different way of showing the line-break. For example:

COBOPT="set COBCPY=/usr/lib/cblcpy:$COBDIR/cpylib:$HOME/mylib::
-N nobound -C \"ans85 noalter list\"
cobextn: .AD .FD"
export COBOPT

The above example:

You can include any valid cob command line in the COBOPT environment variable. If the line includes the -v cob flag, the whole line is echoed to the screen when it is passed to cob.

Previous Topic Next topic Print topic