H-Series Application Migration Guide (H06.03+)

General Programming Issues
H-Series Application Migration Guide429855-006
4-3
Misalignments in TNS/E Native Programs
Misalignments in TNS/E Native Programs
On TNS/E systems, round-down never occurs in native mode, and no options to
change native mode program behavior are supported. Certain misalignments are
treated as fatal events, and for those, no tracing is necessary. Nonfatal misalignments
can also occur, and on both G-series and H-series systems, they can cause
compatibility traps. A program that spends excessive time in compatibility traps caused
by data misalignment can experience severe performance loss. This performance loss
is even greater on TNS/E systems that on TNS/R systems.
To ensure consistent program behavior when migrating TNS/R native programs to
TNS/E native mode and to avoid any performance loss, you should correct data
misalignments before migration. Use the available options to log the misalignment
events or cause the program to fail, then fix the program.
Detecting Data Misalignments
On H-series systems, you can use the EPTRACE facility for reporting misalignment
events and compatibility traps in TNS/E native processes without halting program
execution. EPTRACE is a fully supported version of the unsupported TNS/R XLTRACE
facility, and can be safely used in a production environment.
When run against a program that contains misaligned addresses, EPTRACE reports
the type of each trap and the code address of where each trap occurred. Execution
continues after the event. You can then use the enoft utility to map the code address
from EPTRACE to the source code location in the program.
EPTRACE runs only in the Guardian environment. See the EPTRACE Manual for more
information about using EPTRACE.
The following documents provide more information on detecting and correcting data
misalignments:
C/C++ Programmer’s Guide
pTAL Reference Manual
COBOL Manual for TNS/E Programs
Adjusting For Increased DCT Limits
The Destination Control Table (DCT) contains entries for logical device numbers and
named processes. The DCT limit refers to the maximum number of logical device
numbers and named processes that the operating system can accommodate. As of the
G06.23 RVU, the size of the DCT can optionally be increased from its previous limit of
32,767 (a logical device number can have at most 15 bits) to 65,376 (a logical device