H-Series Application Migration Guide (H06.03+)

H-Series Application Migration Guide429855-006
6-1
6 Native COBOL Migration Tasks
This section describes how to migrate programs written in the TNS/R native HP
COBOL for NonStop Systems language to a TNS/E system. Topics are:
Using the TNS/E Native COBOL Compiler
Directives Changed on page 6-2
RENAMES Clause Has Different Behavior on page 6-3
Symbol Dictionary Requires More Space on page 6-4
TNS/E COBOL Uses IEEE Floating-Point Format on page 6-5
Alignment of Level-01 and Level-77 Data Items Changed on page 6-5
Files Renamed on page 6-5
ecobol Command Line Flags Changed on page 6-6
Using the TNS/E Native COBOL Compiler
The TNS/E native COBOL compiler is similar to the TNS/R native COBOL compiler.
They both produce code optimized for the native environment and they support most of
the same command line options. The COBOL compiler can be run in the Guardian or
OSS environment. TNS/E native COBOL also provides a PC-based cross-compiler
that can be run either at the Windows command prompt or through ETK. Key
differences between the TNS/R and TNS/E native COBOL compilers are:
The TNS/E native COBOL compiler command has a new name. ECOBOL
replaces NMCOBOL as the Guardian command name, and ecobol replaces
nmcobol as the COBOL compiler command for OSS and the PC. The TNS/E native
compilers provide the same command line directives and flags as the TNS/R
native compilers, with the exceptions noted in later in this section.
TNS/E native compilers produce code consisting of Itanium instructions, rather
than the RISC instructions used in the TNS/R environment. Itanium code cannot
be executed on TNS/R processors, and RISC code cannot be executed on TNS/E
processors. This means that any programs called by a migrated application must
also be migrated to TNS/E native mode.
All code produced by the TNS/E native compilers is position-independent code
(PIC), which can be used to create DLLs. Non-PIC is not supported.
Most TNS/R native COBOL source programs compile and execute correctly using the
TNS/E native COBOL compiler with no source code changes. The TNS/E native
COBOL compiler supports all of the same functions and features as the TNS/R native
COBOL compiler. Data files produced by TNS/R native and TNS/E native COBOL are
identical; files created by a native mode program in one environment can be read by a
native mode program in the other environment.
Most of the differences between TNS/R native and TNS/E native COBOL involve
slightly different behaviors of the same features on G-series and H-series systems.
The rest of this section describes the differences between the TNS/R native COBOL