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-4
Migrating HP COBOL Programs
3. If necessary, change your source program
(see Source Program Changes).
To learn whether you must change your source program, compile it with the
NMCOBOL or ECOBOL compiler, which will issue warnings when it encounters
source constructs that it does not accept. Running the NMCOBOL or ECOBOL
compiler with the new DIAGNOSE-85 directive is especially recommended. This
directive causes the NMCOBOL or ECOBOL compiler to issue warnings when it
encounters source constructs that could cause the program to produce different
results than it would if it were compiled with the COBOL85 compiler. For a
complete description of the DIAGNOSE-85 directive, see DIAGNOSE-85 and
NODIAGNOSE-85.
4. If your program calls TNS programs, migrate them to native mode.
Native programs cannot call TNS programs, and TNS/R and TNS/E programs
cannot call each other. Migrate your program and the programs that it calls to
either TNS/R or TNS/E, not a combination of the two.
For general migration information, see the TNS/R Native Application Migration
Guide
For this list of languages, follow these instructions. The last one, Data Alignment,
applies to several languages. “Native” means either TNS/R or TNS/E, whichever
you have chosen.
°
HP C and HP C++
Recompile HP C and HP C++ programs with the native 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 native mode, see the C/C++
Programmers Guide.
°
TAL
Convert TAL programs to pTAL (see the pTAL Conversion Guide). Some CRE
library routines might no longer exist, so you might have to change calls to
them. Also, if you want to reference an object in a CALL or ENTER statement,
you must compile your pTAL program with symbols.
If any of your TAL programs use the FORTRAN convention for determining the
length of a string parameter (that is, if they use the ENTER routine and do not
specify the language TAL), convert them to use another method (for example,
use the string :length convention or pass the length as a separate
parameter).