SNAX/HLS Application Programming Manual

Storage Available to Customization Routines
Customization
7–2 104707 Tandem Computers Incorporated
Storage Available to
User Exit Routines
Customization routines can use part of extended storage, which is allocated at the
request of your SNAXHLS^USEREXIT^ENABLE routine (this routine can also preset
the storage to any desired values). SNAX/HLS then passes the storage address
whenever it invokes a customization routine. If no storage is allocated, it is
appropriate to use the address passed, as it would result in SNAX/HLS abending with
a trap.
Global and Session-
Specific Uses of
Storage
Storage can be used for both global and session-specific purposes. The latter is
possible because the SNAXHLS^USEREXIT^ENABLE routine is given the value
defining the maximum number of sessions that can be open, as derived from the
MAX^LUS parameter at program initiation. SNAX/HLS also passes a session index
on all session-related events. Using the values passed, for example, your routines
might calculate the storage needed for all possible sessions and by convention
“reserve” that amount for storage of session-specific information (global information
would be stored outside the reserved area). The session index (which is derived from
the session ID) never exceeds the maximum number of sessions. Given the storage
size reserved for each session, your routine can multiply this by the session index to
compute the location of the area reserved for a given session.
Installation of User
Exit Routines
Your user-exit routines must be compiled into a library. When you initiate
SNAX/HLS, you specify the name of that library as the LIB argument. If you omit the
LIB specification, a dummy library is used. Your library must include all seven
customization routines even if one or more are not invoked. Called upon initialization
of SNAX/HLS, the enabling routine is given some operating parameters and returns
an enabling mask that tells SNAX/HLS which customization routines to use.
Thereafter, SNAX/HLS calls the enabled user-exit routines at the appropriate times
(see Table 7-1).
If SNAX/HLS has been installed by the Install procedure, the system library contains
do-nothing routines for the customization routines. This allows your library to omit
routines never called.