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

Migrating TNS/R Programs to TNS/E Programs
HP COBOL Manual for TNS/E Programs520347-003
33-2
Migrating HP COBOL Programs
Migrating HP COBOL Programs
The recommended procedure for migration from TNS/R HP COBOL to TNS/E
HP COBOL is:
1. If necessary, change your source program
(see Source Program Changes).
To learn whether you must change your source program, compile it with the
ECOBOL compiler, which will issue warnings when it encounters source constructs
that it does not accept.
2. If your program calls TNS/R programs, migrate them to TNS/E.
TNS/R and TNS/E programs cannot call each other.For general migration
information, see the H-Series Application Migration Guide.
For this list of languages, follow these instructions. The last one, Data Alignment,
applies to several languages.
°
HP C and HP C++
Recompile HP C and HP C++ programs with the TNS/E HP C and HP C++
compilers, respectively. Specify the SYMBOLS pragma when recompiling an
HP C or HP C++ program that your HP COBOL program references in a CALL
or ENTER statement (so that the native compiler can validate calls and
parameters to the HP C or HP C++ module). For information on tools that can
help you migrate HP C or HP C++ programs to TNS/E, see the C/C++
Programmer’s Guide.
°
pTAL
Recompile pTAL programs with the EpTAL compiler, using the SYMBOLS
directive if you want to reference a pTAL routine in a CALL or ENTER
statement. For information about the EpTAL compiler, see the pTAL Reference
Manual.
°
Data Alignment
The ECOBOL compiler aligns each level-01 item and each level-77 item on a
physical 8-byte boundary, not on a physical 2-byte boundary as the NMCOBOL
compiler does. Offsets from the containing level-01 or level-77 item are the
same in both compilers. The difference in alignment of level-01 and level-77
items for the ECOBOL compiler will not affect a program unless the program
depends on the relative placement in memory of distinct level-01 or level-77
items. If your program depends on such relative placement, correct it.
3. (Optional) Put converted routines in a DLL.
If you want to put the routines that you converted to native mode in Step 2 in a
DLL, follow the directions in Dynamic-Link Libraries (DLLs)
.