SNAX/HLS Application Programming Manual
PREPARE-TO-CLOSE Verb
SNAX/HLS Verbs
104707 Tandem Computers Incorporated 5–53
PREPARE-TO-CLOSE
Verb
The PREPARE–TO–CLOSE verb is used to terminate a session in an orderly fashion.
Use of this verb is encouraged to ensure that both session partners are aware that a
session is about to be terminated, thus allowing each to do clean–up processing.
The PREPARE–TO–CLOSE verb, if issued by the primary partner (PLU), indicates a
readiness to terminate the session. The SLU receives the request but can still send and
receive data on the session. When the SLU agrees to terminate the session, a special
message is placed on the PLU’s message queue with DATA–TYPE–RECEIVED is
DT–REQUEST–CLOSE. Once this message is received, the PLU should realize that the
SLU can no longer send any data. Thus, the PLU must either continue with the session
termination (by issuing CLOSE–SESSION or HLS–CLOSE), or resume normal session
traffic (by issuing the HLS–FLOW–CONTROL(RM) request). Note, however, that this
last option is available only under certain SNA session rules.
If the PREPARE–TO–CLOSE verb is issued by the secondary partner (SLU), the exact
sequence of events depends upon whether the verb is being issued on the SLU’s
initiative, or in response to a previously received message with
DATA–TYPE–RECEIVED is DT–PREPARED–TO–CLOSE.
If issued on the SLU’s initiative, it indicates that the SLU is ready and prepared to have
the session closed. SNA protocol rules do not require the PLU to actually close the
session, although it is strongly recommended.
If, however, the SLU issues the verb in response to a previously received
DT–PREPARED–TO–CLOSE message, the verb confirms that all work is complete and
the session can be closed. Correct SNA protocol rules call for the SLU to continue
issuing RECEIVE–DATA verbs until either the session closure occurs, or the PLU
decides to return to normal session traffic by sending the SLU a message that results in
a DT–FLOW–CONTROL(RM) message. This latter option is supported only under
certain SNA session rules.