SNAX/HLS Application Programming Manual

3 Sessions
104707 Tandem Computers Incorporated 3–1
A session in SNAX/HLS is the vehicle through which partners exchange data and
controls. A half–session refers to the session as seen by one of the partners. A typical
session goes through the following sequence of events:
1. Allocating the half–session
2. Opening communication with the session partner
3. Exchanging data with session partner
4. Preparing for an orderly close
5. Closing communication with the session partner
6. Deallocating the half-session
Session allocation and deallocation and opening and closing are accomplished in two
different ways:
The simple (or basic) method uses the OPEN–SESSION verb to allocate and open
the session and uses the CLOSE–SESSION verb to close and deallocate the session.
These verbs have been supported by SNAX/HLS since the product was first
developed. These verbs are retained and supported so that old applications can
run under the present, newer version of SNAX/HLS. Developers of new
applications are encouraged, however, to use the enhanced method described
next.
The enhanced method uses the HLS–ALLOCATE and HLS–OPEN verbs to
allocate and open the session and uses the HLS–CLOSE and HLS–DEALLOCATE
verbs to close and deallocate the session.
For a given session, the two methods outlined above cannot be mixed.
Allocating the Half-Session The allocation of a half–session is accomplished using the HLS–ALLOCATE verb or
the OPEN–SESSION verb. The application program identifies the session partner by
LU name and provides the name of the PROFILE containing the rules under which the
session is to proceed.
Assuming that the allocation succeeds, SNAX/HLS responds by providing the
application with a session ID. Henceforth, the application uses this session ID to
identify the session in all verb requests and replies.
Once a half–session is allocated by HLS–ALLOCATE, three things are possible:
Your program can deallocate the half–session.
Your program can receive operator messages directed to it by some other process
such as HLSCOM.
Your program can request the opening of the session and thereby establish
communication with the session partner.