SNAX/HLS Application Programming Manual
Procedure Specifications
Customization
104707 Tandem Computers Incorporated 7–17
When your routine is called, the verb is not processed or checked by SNAX/HLS. In
particular, the verb code might be invalid, the session ID might refer to a nonexistent
session, and so on. It is therefore necessary that you check all values for relevance.
Typically, your routine extracts information from the verb request (such as the verb
code and other application data) and saves it in the session-specific storage area
previously allocated. This information can be correlated with the reply to the
SNAXHLS^USEREXIT^VERB^OUT routine.
Furthermore, you can re-edit the text of the verb. This might be useful if your
application interface works in bytes but the protocol works in bits, or if the data must
undergo some transformation that is difficult to do in the calling application.
Remember that you can save any required context in the session-specific storage, and
you can preset that storage when you see verbs such as HLS-OPEN or
HLS-CALL-USER go by.
When changing the length of the vlen message, recall that many verbs have length
fields, such as USER-DATA-LENGTH, in the RECEIVE-DATA verb. These length
fields must exactly match the length implied by vlen.
The USEREXIT^VERB^OUT
Routine
The SNAXHLS^USEREXIT^VERB^OUT routine is invoked when SNAX/HLS is
about to pass a verb reply to the application program (but only if thus enabled by your
enabling routine). This allows the customization routine to inspect and perhaps
modify the verb reply before SNAX/HLS passes it to the application program.
The routine is specified as follows:
PROC SNAXHLS^USEREXIT^VERB^OUT(wsadr,
vblock,
vbufr,
vlen);
INT(32) wsadr;
INT .EXT vblock(snaxhls^userexit^verb^block);
STRING .EXT vbufr;
INT .EXT vlen;
wsadr
is the 32-bit extended address of the global storage area, as requested in the
enabling routine (SNAXHLS^USEREXIT^ENABLE). It is inappropriate to use this
address if no storage is allocated and would result in SNAX/HLS abending.
vblock
points to the verb-block structure defined above. It enables you to identify the
issuer of the request.