Specifying compiler options in a batch compilation
You can specify compiler options for each program in the
batch sequence either with a CBL or PROCESS statement
that precedes the program, or upon invocation of the compiler.
About this task
If a CBL or PROCESS statement
is specified in the current program, the compiler resolves the CBL or PROCESS statements
together with the options in effect before the first program. If the
current program does not contain CBL or PROCESS statements,
the compiler uses the settings of options in effect for the previous
program.
You should be aware of the effect of certain compiler options on the precedence of compiler option settings for each program in the batch sequence. Compiler options are recognized in the following order of precedence, from highest to lowest:
- Installation defaults that are fixed at your site
- Values of the
BUFSIZE,DEFINE,OUTDD,SQL,SQLIMS, andTESTcompiler options in effect for the first program in the batch - Options on
CBLorPROCESSstatements, if any, for the current program - Options specified in the compiler invocation (JCL
PARMor TSOCALL) - Installation defaults that are not fixed
If any program in the batch sequence requires the BUFSIZE, DEFINE, OUTDD, SQL,
SQLIMS, or TEST option, that option must be
in effect for the first program in the batch sequence. (When processing BASIS,
COPY, or REPLACE statements, the compiler handles all programs in
the batch as a single input file.)
If you specify the option for the batch, you cannot change
the NUMBER and SEQUENCE options
during the batch compilation. The compiler treats all programs in
the batch as a single input file during NUMBER and SEQUENCE processing
under the option; therefore,
the sequence numbers of the entire input file must be in ascending
order.
If the compiler diagnoses the LANGUAGE option
on the CBL or PROCESS statement
as an error, the language selection reverts to what was in effect
before the compiler encountered the first CBL or PROCESS statement.
The language in effect during a batch compilation conforms to the
rules of processing CBL or PROCESS statements
in that environment.