TNS/R Native Application Migration Guide
Guardian API Migration Tasks
TNS/R Native Application Migration Guide—523745-001
9-4
CURRENTSPACE
CURRENTSPACE
The CURRENTSPACE procedure returns the ENV register (as saved in the stack
marker) and the space ID of the caller. Native processes do not have the same register
and space ID architecture. Remove calls to CURRENTSPACE from your program. If
your program’s logic relies on the TNS process architecture, significant recoding of
your application to support the native process architecture is required.
FORMATDATA
The FORMATDATA procedure converts data item values between internal and external
representations. The FORMATDATA procedure requires that all of its reference
parameters be 16-bit addresses. The native architecture does not support 16-bit
addresses. Replace calls to FORMATDATA procedure with calls the FORMATDATAX
procedure. The FORMATDATAX procedure requires that all of its reference parameters
be 32-bit addresses. See the Guardian Procedure Calls Reference Manual for details
LASTADDR
The LASTADDR procedure returns the‘G’[0] relative address of the last word in the
application process’ data area. Native processes do not support G-relative addressing.
Replace calls to the LASTADDR procedure with calls to the ADDRESS_DELIMIT_
procedure. See the Guardian Procedure Calls Reference Manual for details.
LASTADDRX
The LASTADDRX procedure allows user programs to check stack limits or parameter
addresses. LASTADDRX returns the last extended address available in the specified
relative segment. Replace calls to the LASTADDR procedure with calls to the
ADDRESS_DELIMIT_ procedure. See the Guardian Procedure Calls Reference
Manual for details
XBNDSTEST
The XBNDSTEST procedure enables programs to check stack limits and parameter
addresses. To check parameter addresses, replace calls to the XBNDSTEST
procedure with calls to the REFPARAM_BOUNDSCHECK_ procedure. The
REFPARAM_BOUNDSCHECK_ procedure checks the validity of parameter addresses
passed to the procedure that calls it. Primarily, it verifies that a specified memory area
is valid for a specified type of access, such as read only or read/write. See the
Guardian Procedure Calls Reference Manual for details.