TNS/E Native Application Conversion Guide
Converting COBOL Programs
TNS/E Native Application Conversion Guide—529659-003
4-7
Possible Changes Required
•
SEARCH
For the native COBOL compiler, each
object-name
in a SEARCH directive must
designate a native object file (otherwise the native COBOL compiler reports an
error). If a native COBOL program references the object in a CALL or ENTER
statement, the object must have been compiled with symbols.
•
SUBTYPE
The SUBTYPE directive works in the native COBOL compiler only if you specify
the new RUNNABLE directive (see RUNNABLE directive on page 4-11).
ENTER Statement
The
language
parameter of the ENTER statement is unnecessary, because the
native COBOL compiler can determine the language in which the program is written. If
you do specify
language
, it must be C or TAL. If you specify TAL, the native COBOL
compiler requires a pTAL program (it does not accept TAL programs). If you specify
FORTRAN or Pascal, the native COBOL compiler issues an error message. (You must
convert to native languages any FORTRAN, Pascal, or TAL programs that your
COBOL program calls, as Step 4 of Converting COBOL Programs on page 4-2
explains.) Although a native COBOL program can use the ENTER statement to call
C++ or pTAL programs,
language
cannot have the value C++ or pTAL.
Floating-Point Arithmetic
The TNS COBOL and native COBOL compilers can produce slightly different results
for floating-point arithmetic, partly because of different floating-point formats used by
the TNS and native COBOL compilers. TNS COBOL uses the HP proprietary TNS
format, while TNS/E native COBOL uses the IEEE format. This format difference can
cause problems for exponentiation with a negative or fractional exponent (such as
10**-3 or 2**0.3). To avoid these problems, include the ROUNDED phrase in
statements that perform floating-point arithmetic so that both compilers produce the
same results. For more information on the ROUNDED phrase, see the
COBOL Manual
for TNS/E Programs
.
Working-Storage Limits
TNS COBOL enforces a limit of slightly less than 64 KB on data defined in the
WORKING-STORAGE section and a limit of 127.5 KB on data defined in the
EXTENDED-STORAGE section. Native COBOL does not enforce a specific limit.










