Specifying compiler options under z/OS
The compiler is installed with default compiler options. While installing the compiler, the system programmer can fix compiler option settings to, for example, ensure better performance or maintain certain standards. You cannot override any compiler options that are fixed.
About this task
For options that are not fixed, you can override the default settings by specifying compiler options in any of these ways:
- Code them on the
PROCESS
orCBL
statement in COBOL source. - Include them when you start the compiler, either on the
PARM
parameter on theEXEC
statement in the JCL or on the command line under TSO. - Include them in a
SYSOPTF
data set, and specify theOPTFILE
compiler option in either of the above ways.
The compiler recognizes the options in the following order of precedence from highest to lowest:
- Installation defaults that are fixed by your site
- Values of the
BUFSIZE
,OUTDD
,SQL
, andSQLIMS
compiler options in effect for the first program in a batch - Options specified on
PROCESS
(orCBL
) statements, preceding theIDENTIFICATION DIVISION
- Options specified on the compiler invocation (JCL
PARM
parameter or the TSOCALL
command) - Installation defaults that are not fixed
This order of precedence also determines which options are in effect when conflicting or mutually exclusive options are specified.
The precedence of options in a SYSOPTF
data
set depends on where you specify the OPTFILE
compiler
option. For example, if you specify OPTFILE
in a PROCESS
statement,
the SYSOPTF
options supersede the options that you
specify in the compiler invocation. For further details, see the related
reference below about the OPTFILE
option.
Most
of the options come in pairs; you select one or the other. For example,
the option pair for a cross-reference listing is XREF
| NOXREF
.
If you want a cross-reference listing, specify XREF
;
if you do not, specify NOXREF
.
Some options
have subparameters. For example, if you want 44 lines per page on
your listings, specify LINECOUNT(44)
.
Defining a compiler-option data set (SYSOPTF)
Specifying compiler options in the PROCESS (CBL) statement
Specifying compiler options in a batch compilation