SNAX/HLS Application Programming Manual
SCOBOLX Applications
SNAX/HLS Programming Standards
1–10 104707 Tandem Computers Incorporated
Normal termination occurs when SNAX/HLS completes your operation, independent
from the occurrence of any timeout or unsolicited message arrival. There might have
been a timeout or a message arrival, but SNAX/HLS terminated the operation based
upon conditions outside these events. In this case, your SEND MESSAGE operation
completes just as if these escape clauses were not present. The TERMINATION-
STATUS reflects which of the enumerated replies actually happened, and you should
examine the VERB-CODE field of the reply to figure out which replies these are.
The error termination occurs when something unexpected occurs during the
processing of the message. Important here is the occurrence of a timeout that was
allowed in a TIMEOUT clause. If the clause is present and the timeout occurs, the TCP
sends an interrupt signal (CONTROL-26) to SNAX/HLS. In addition to the normal
termination described in the previous paragraph and other errors defined in Pathway,
your program detects the occurrence of any file-system errors. The only special action
performed by Pathway is that it recodes a return code of 187 into 40. Thus, it redefines
the No Data termination as a timeout termination. The following can then be detected
as:
TERMINATION-STATUS = 1 (file-system error)
TERMINATION-SUBSTATUS = 40 (if No Data)
= 189 (if Forthcoming)
= other (if any other error code)
The unsolicited message termination occurs only when you specify the ESCAPE ON
UNSOLICITED MESSAGE clause in the SEND MESSAGE statement, and an
unsolicited message actually arrives. As above, Pathway’s TCP sends an interrupt
signal (CONTROL-26) to SNAX/HLS. The results are presented to your program as
follows:
TERMINATION-STATUS = the ordinal of the ESCAPE clause
TERMINATION-SUBSTATUS = 187 (if No Data)
= 189 (if Forthcoming)
The following example shows how you might write your application program to treat
these conditions. The example assumes that the application program wants to work
with both timeout and unsolicited messages. The example uses the SEND-AND-
RECEIVE-DATA verb because it can be interrupted both in its send and receive phase.
The example assumes that the largest data block you will send is 397 bytes long, and
the largest data block you will ever receive is 435 bytes long. The example also
assumes that the only replies you get are the reply to the SEND-DATA and a
RECEIVE-DATA reply. In an actual case, you might have to allow for additional
possibilities.