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

Migrating TNS Applications to H-Series Systems
H-Series Application Migration Guide429855-006
B-12
Handling Misaligned Data in TNS Programs
INSPECT Attribute Changes
The INSPECT process attribute determines which debugger will be selected by the
process. The debugger selected depends on the platform (TNS/R or TNS/E), execution
mode (TNS or native), and debugger availability. The debugger selected by the
INSPECT attribute for TNS processes is shown in the following table. For each
process type and INSPECT setting, the table shows the debuggers in the order
selected, depending on debugger availability.
Handling Misaligned Data in TNS Programs
Programs compiled with the TNS compilers align data items on even-byte addresses.
Occasionally, however, a programming error or a run-time event will cause a data item
to violate this alignment rule; that is, the data item is aligned on an odd-byte address.
These misalignments can occur in programs running in interpreted or accelerated
mode.
The behavior of programs having misaligned data items, and the options available for
handling misaligned data, differ between H-series and G-series systems. On a
G-series system, these misaligned addresses are sometimes rounded down to the
next lower even-byte address. This “round-down” behavior can result in unexpected
program behavior, including run-time errors or incorrect results. Furthermore, it is
impossible to predict when a misalignment will result in a round-down. And when a
program containing misaligned data is migrated to a different release level or a
different processor, the program’s behavior might change.
On an H-series system, misaligned addresses are never rounded down. Therefore, the
behavior of an interpreted or accelerated TNS program with misaligned addresses on
H-series system might not be the same as on a G-series system; that is, a program
with a rounded down address would produce a particular result on a G-series system,
but, on an H-series system, the address would not be rounded down and might give a
different result. Therefore, you are encouraged to correct any occurrences of
misaligned addresses in TNS programs, either before or after migration.
In G-series RVUs, facilities are provided to help identify and correct these misaligned
addresses. The System Configuration Facility (SCF) provides options to select one of
INSPECT ON INSPECT OFF
G-Series TNS
Processes
1. Visual Inspect (see note 1)
2. Inspect
3. Debug
Debug
H-Series TNS
Processes
1.Visual Inspect (see note 1)
2.Inspect
3.Native Inspect (see note 2)
1. Inspect
2. Native Inspect (see note 2)
Note 1. Visual Inspect requires the existence of a matching client connection.
Note 2. Native Inspect does not actually support TNS debugging. When used with a TNS process,
commands such as step and next apply to the underlying TNS/E view rather than the TNS process.