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-23
Maintaining Common Source Code
Maintaining Common Source Code
To maintain “common source code” that can be compiled with D32.00 and later RVUs
of the COBOL85 compilers, D44.01 and later RVUs of the NMCOBOL compiler, and
H06.01 and later RVUs of the ECOBOL compiler, follow these guidelines:
Either do not use HP COBOL language features that are not supported by all
compilers, or use conditional compilation to isolate those features.
You can effect conditional compilation with these directives:
°
IF and IFNOT
°
ENDIF
°
SETTOG
°
RESETTOG
Use separate build scripts to run TNS and native tools, including the COBOL85,
NMCOBOL, and ECOBOL compilers.
For each compilation, use the appropriate file (or files) of dummy routines.
Files of dummy routines enable the compilers to accept ENTER statements that
are to be resolved at program load time (see Table 13-4).
Using the Inspect and Visual Inspect
Debuggers
The Inspect and Visual Inspect interactive symbolic debuggers handle TNS and native
HP COBOL programs differently. For a native HP COBOL program, the Inspect
debuggers STEP command is line-oriented. If the current statement is on a single line,
the STEP command steps to the next statement (that is, the debugger works as the
command STEP 1 V works for a TNS HP COBOL program). If the current statement is
on the same line as another statement or statements, the STEP command steps to the
next line on which a new statement starts. The Inspect debugger cannot step one
sentence in a native HP COBOL program (that is, the command STEP 1 S does not
work).
Note. You must use Visual Inspect to debug PIC loadfiles.