COBOL Manual for TNS and TNS/R Programs

Migrating TNS Programs to Native Programs
HP COBOL Manual for TNS and TNS/R Programs522555-006
33-17
Possible Changes Required
SAVEABEND and NOSAVEABEND
The SAVEABEND and NOSAVEABEND directives work in the NMCOBOL and
ECOBOL compilers only if you specify the new RUNNABLE directive (see
RUNNABLE directive).
For a complete description of these directives, see SAVEABEND and
NOSAVEABEND.
SEARCH
For the NMCOBOL compiler, each object-name in a SEARCH directive must
designate a TNS/R native object file (otherwise the compiler reports an error).
For the ECOBOL compiler, each object-name in a SEARCH directive must
designate a TNS/E native object file (otherwise the compiler reports an error).
If a native HP COBOL program references the object in a CALL or ENTER
statement, the object must have been compiled with symbols.
For a complete description of this directive, see SEARCH and NOSEARCH.
SUBTYPE
The SUBTYPE directive works in the NMCOBOL and ECOBOL compilers only if
you specify the new RUNNABLE directive (see RUNNABLE directive).
For a complete description of this directive, see SUBTYPE.
ENTER Statement
The language parameter of the ENTER statement is unnecessary, because the
NMCOBOL and ECOBOL compilers can determine the language in which the program
is written. If you do specify language, it must be HP C or TAL. If you specify TAL, the
NMCOBOL or ECOBOL compiler requires a pTAL program (it does not accept TAL
programs). If you specify FORTRAN or Pascal, the NMCOBOL or ECOBOL compiler
gives an error message. (You must convert any FORTRAN, Pascal, or TAL programs
that your HP COBOL program calls to native languages, as Step 4 of Migrating
HP COBOL Programs explains.) Although a native HP COBOL program can use the
ENTER statement to call HP C++ or pTAL programs, language cannot have the
value HP C++ or pTAL.
Floating-Point Arithmetic
For floating-point arithmetic, the COBOL85 compiler can produce slightly different
results than the NMCOBOL and ECOBOL compilers produce. This is most likely to
cause problems for exponentiation with a negative or fractional exponent (such as
10**-3 or 2**0.3). You can avoid this problem by including the ROUNDED Phrase in
statements that perform floating-point arithmetic. With the ROUNDED phrase, both
compilers produce the same results.