COBOL Manual for TNS and TNS/R Programs
Migrating TNS Programs to Native Programs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
33-9
Misalignment Handling
The method that you choose does not apply to every misaligned address, only to those
that would have been rounded down in RVUs prior to G06.17.
Table 33-1. TNS Misalignment Handling Methods
Method Description
ROUND
(default)*
After rounding down a misaligned address, the system proceeds to access
the address, as done in G06.16 and earlier RVUs.
FAIL Instead of rounding down a misaligned address and proceeding to access
the target, the operating system considers the instruction to have failed.
For a Guardian process, this failure generates an Instruction Failure trap
(trap #1). By default, this trap
causes the process to go into the debugger,
but the program can specify other behavior (for example, process
termination or calling a specified trap-handling procedure). For information
about trap handling, see the Guardian Programmer’s Guide.
For an OSS process, this failure generates a SIGILL signal
(signal #4). By
default, this signal causes process termination, but the program can specify
other behavior (for example, entering the debugger or calling a specified
signal-handler procedure). The signal cannot be ignored. For information
about signal handling, see the explanation of the sigaction() function in
the Open System Services System Calls Reference Manual.
NOROUND The system uses the operand’s given odd address (not rounded down) to
complete the operation. If the operation is an atomic operation, atomicity is
no longer guaranteed.
* Use this method on production systems to avoid changing the semantics of old TNS programs. FAIL could
cause possibly fatal Instruction Failure traps in faulty TNS programs. NOROUND might change the semantics of
some faulty programs.
Note. ROUND and NOROUND misalignment handling are both intended as temporary
solutions, not as a substitute for changing your program to ensure that it has only aligned
addresses.
Programs that depend on NOROUND misalignment handling cannot be safely migrated to all
present and future NonStop platforms or to systems configured with ROUND or FAIL
misalignment handling.
Programs that depend on ROUND misalignment handling cannot be safely migrated “as is” to
future NonStop platforms or to systems configured with NOROUND or FAIL misalignment
handling.