COBOL Manual for TNS/E Programs (H06.03+)

Program Compilation
HP COBOL Manual for TNS/E Programs520347-003
11-64
OPTIMIZE
OPTIMIZE
OPTIMIZE specifies the extent to which the compiler attempts to optimize the code it
emits.
level
is 0, 1, or 2. Optimization level affects compilation speed. The effect of each level
is:
Level Effect
0 Code is not optimized. Provided in case other optimization levels cause
errors. Supports symbolic debugging; data is always in memory.
1
(default)
Code is optimized within statements and across statement boundaries. The
resulting code is more efficient than that produced by lower levels of
optimization. Supports symbolic debugging; data is not always in memory.
2 Code is optimized within statements and across statement boundaries, and
the resulting code is more efficient than code produced by lower levels.
Note. Code generated under OPTIMIZE 1 is more difficult to debug than code generated
under OPTIMIZE 0. Optimization under OPTIMIZE 2 obscures statement boundaries.
Before you attempt to use a symbolic debugger to debug a program, do either:
Be certain that the program was compiled with OPTIMIZE 0.
Use the output generated by the INNERLIST directive to be certain of statement
boundaries.
Default: OPTIMIZE 1
Placement: Outside the boundary of a separately compiled program
Scope: The optimization level active at the beginning of a separately compiled
program determines the level of optimization for that program and any
programs it contains.
Dependencies: None
OPTIMIZE level
VST297.vsd