TNS/R Native Application Migration Guide
Guardian API Migration Tasks
TNS/R Native Application Migration Guide—523745-001
9-5
XSTACKTEST
XSTACKTEST
The XSTACKTEST procedure ensures that adequate stack space is available and
returns a set of constants to be used with the XBNDSTEST procedure.
If XSTACKTEST is called to return constants passed to the XBNDSTEST procedure,
delete the XSTACKTEST procedure, because native programs cannot call the
XBNDSTEST procedure. See the XBNDSTEST procedure in this section for more
details.
If XSTACKTEST is called to ensure that adequate stack space is available, replace
XSTACKTEST with calls to the HEADROOM_ENSURE_ procedure. The
HEADROOM_ENSURE_ procedure allows you to make sure that the current main
stack or privileged stack has enough room for the needs of your process. See the
Guardian Procedure Calls Reference Manual for details.
Using the INITIALIZER Procedure
The INITIALIZER procedure reads the startup message, and optionally, requests
receipt of the ASSIGN and PARAM messages sent by the starting process (which is
often a TACL process). The INITIALIZER procedure optionally initializes file control
blocks (FCBs) with the information read from the startup and ASSIGN messages.
Calls to the INITIALIZER procedure that pass the first parameter (the RUCB, run-unit
control block) must be changed. Such programs must specify two additional
parameters. Other callers to the INITIALIZER procedure do not need to be changed.
See the Guardian Procedure Calls Reference Manual for details.
Using Sequential I/O Procedures
Many of the sequential I/O procedures (SIO) take file control blocks (FCBs) as
parameters. TNS and native programs have FCBs of different sizes. The following SIO
procedures have separate TAL and pTAL declarations to support FCBs of different
sizes: CLOSE^WRITE, OPEN^FILE, READ^FILE, WAIT^FILE, and WRITE^FILE. You
do not need to change your programs for different FCB sizes. The TAL and pTAL
compilers automatically select the correct procedure version.
Callers to the CHECK^FILE and SET^FILE SIO procedures must make the changes
described in the following subsections.