MAXPCF
Use the MAXPCF
option to specify a maximum
program complexity factor value. The program complexity factor (PCF)
is computed by the compiler and the computed value is in the listing
file. If the PCF of your program exceeds the maximum value, the compiler
will automatically reduce the optimization level to speed up the compilation
and use less storage. Therefore, when you compile a suite of programs,
you do not have to specify an OPTIMIZE
option value
for each program.
Default is: MAXPCF(100000)
Abbreviations are: None
n must be an integer of 0 - 999999.
- The number of COBOL statements in the
PROCEDURE DIVISION
, including generated statements from theCICS
,SQL
orSQLIMS
options, and the expansion ofCOPY
andREPLACE
statements - Initialization operations for
WORKING-STORAGE
orLOCAL-STORAGE
data items withvalue
clauses - Operations for variable-length groups or subgroups in the
DATA DIVISION
, which compute their size at run time
For
large and complex programs, you can use the MAXPCF
option
to set a threshold on the program complexity that the compiler attempts
optimize. Lower the MAXPCF value to reduce the optimization level,
hence the compiler needs less memory and compilation time. Raise the
MAXPCF value to attempt to optimize the programs at the cost of longer
compilation time.
If you specify MAXPCF(0)
,
no limit is enforced on the complexity of the program, and the MAXPCF
option
has no effect.
If you specify MAXPCF
(n) and n is
not zero, when the program complexity factor exceeds n,
any specification of OPTIMIZE(1)
or OPTIMIZE(2)
is
reset to OPTIMIZE(0)
, and a warning message is generated.
If the COBOL source file contains a sequence of source
programs (a batch compile), the MAXPCF
limit is applied
on a per program basis.
- If the
OPTIMIZE(1)
orOPTIMIZE(2)
option is set at installation time as a fixed, nonoverridable option, thenMAXPCF(n)
with a nonzero n is an option conflict. In this case, theOPTIMIZE
option takes precedence and theMAXPCF(0)
option is forced on. - If you attempt to optimize a program larger than
the default threshold by raising the value of
MAXPCF
to n where n is greater than the default, or by specifyingMAXPCF(0)
, the compiler might take excessive time to compile or fail to compile because of insufficient memory.