Specifying compiler options under z/OS UNIX
The compiler is installed and set up with default compiler options. While installing the compiler, a system programmer can fix compiler option settings to ensure better performance or maintain certain standards. You cannot override any compiler options that your site has fixed.
For options that are not fixed, you can override the default settings by specifying compiler options in any of three ways:
- Code them on the
PROCESS
orCBL
statement in your COBOL source. - Specify the
-q
option of thecob2
command. - Set the COBOPT environment variable.
The
compiler recognizes the options in the above order of precedence,
from highest to lowest. The order of precedence also determines which
options are in effect when conflicting or mutually exclusive options
are specified. When you compile using the cob2
command,
compiler options are recognized in the following order of precedence,
from highest to lowest:
- Installation defaults fixed as nonoverridable
- The values of
BUFSIZE
,SQL
,SQLIMS
, andOUTDD
options in effect for the first program in a batch compilation - The values that you specify on
PROCESS
orCBL
statements in COBOL source programs - The values that you specify in the
cob2
command's-q
option string - The values that you specify in the COBOPT environment variable
- Installation defaults that are not fixed
Restrictions:
- Do not use the
SQL
compiler option under z/OS UNIX.Neither the separate SQL precompiler nor the integrated SQL coprocessor runs under z/OS UNIX.
- Do not use the
SQLIMS
compiler option under z/OS UNIX. - The
OPTFILE
option is ignored when you compile using thecob2
command under z/OS UNIX.You can use the COBOPT environment variable, which provides a capability that is comparable to
OPTFILE
, instead.