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

33 Migrating TNS/R Programs to TNS/E Programs
NOTE: This section applies to migrating TNS/R HP COBOL programs to TNS/E HP COBOL
programs, and assumes that you are running RVU G06.20 or later. To migrate TNS HP COBOL
programs to TNS/R or TNS/E HP COBOL programs, see the COBOL Manual for TNS and TNS/R
Programs.
HP provides these native compilers for HP COBOL source programs:
Objects ProducedCompiler
TNS/RNMCOBOL
TNS/EECOBOL
The ECOBOL compiler is available both on NonStop systems and on the PC. In this section,
“ECOBOL compiler” refers to both of the ECOBOL compilers, unless otherwise noted.
Taking an HP COBOL source program that was compiled with the NMCOBOL compiler and
recompiling it with the ECOBOL compiler is called “migrating from TNS/R to TNS/E.” Migrating
to TNS/E might require source program changes.
You can write HP COBOL source programs that can be compiled with any version of the NMCOBOL
or ECOBOL compiler.
Reason to Migrate
An HP COBOL program compiled with the NMCOBOL compiler will not run on a TNS/E system.
If you want to run an HP COBOL program on a TNS/E system, you must compile it with the ECOBOL
compiler.
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
958 Migrating TNS/R Programs to TNS/E Programs