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 or CBL statement in COBOL source.
  • Include them when you start the compiler, either on the PARM parameter on the EXEC statement in the JCL or on the command line under TSO.
  • Include them in a SYSOPTF data set, and specify the OPTFILE compiler option in either of the above ways.

The compiler recognizes the options in the following order of precedence from highest to lowest:

  1. Installation defaults that are fixed by your site
  2. Values of the BUFSIZE, OUTDD, SQL, and SQLIMS compiler options in effect for the first program in a batch
  3. Options specified on PROCESS (or CBL) statements, preceding the IDENTIFICATION DIVISION
  4. Options specified on the compiler invocation (JCL PARM parameter or the TSO CALL command)
  5. 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).