COBOL Manual for TNS/E Programs (H06.03+)
Migrating TNS/R Programs to TNS/E Programs
HP COBOL Manual for TNS/E Programs—520347-003
33-4
Possible Changes Required
Possible Changes Required
•
Directives
•
RENAMES Clause
Make any necessary changes to these items before compiling your HP COBOL source
program with the ECOBOL compiler.
Directives
•
CONSULT Directive
For the NMCOBOL compiler, each object-name in a CONSULT directive must
designate a TNS/R native object file (otherwise the compiler reports an error).
For the ECOBOL compiler, each object-name in a CONSULT directive must
designate a TNS/E native object file (otherwise the compiler reports an error).
For a complete description of this directive, see CONSULT and NOCONSULT.
•
OPTIMIZE Directive
The NMCOBOL compiler handles OPTIMIZE 2 as if it were OPTIMIZE 1, because
native COBOL does not support global optimization. The ECOBOL compiler
handles OPTIMIZE 2 as the COBOL85 compiler does.
OPTIMIZE 0 (no optimization) is recommended when you are debugging a
program using the ECOBOL compiler. OPTIMIZE 1 (most optimizations) is
recommended for production.
For a complete description of this directive, see OPTIMIZE.
Level
Effect
NMCOBOL Compiler ECOBOL Compiler
0 Code is not optimized. Provided in
case other optimization levels cause
errors. Supports symbolic debugging;
data is always in memory.
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.
Code is optimized within
statements, but not across
statement boundaries. Appropriate
for application programs still being
developed and tested. Supports
symbolic debugging; data is not
always in memory.
2 Uses level 1 instead. Code is optimized within
statements and across statement
boundaries, and the resulting code
is more efficient than code
produced by lower levels.










