SNAX/HLS Application Programming Manual

SCOBOLX Applications
SNAX/HLS Programming Standards
1–18 104707 Tandem Computers Incorporated
manner in which the request and the reply are connected. When you use the queued
completion mode, the reply with RC-FORTHCOMING is returned to you, and the actual
completion arrives later. When you use the interrupt facility, the reply with
file-system reply code 189 is returned to you and the actual completion arrives later.
Anyone using this feature should be aware of the possibility that the WRITEREAD
request might already have been completed by the time the CONTROL signal arrives
in SNAX/HLS. For example, SNAX/HLS might already have issued the REPLY call,
but your application program might not yet have received it. Therefore, the
application program should allow not only for the codes 187 and 189, but also for code
0 as a possible reply. Furthermore, you should be aware that when you issue the
CONTROL 26 request, there are, in general, two outstanding I/O processes for the
file—one corresponding to the CONTROL request and the other corresponding to the
original WRITEREAD request. Make sure that the nowait depth parameter in the
OPEN request allows for this.
In a typical use of this interrupt feature, assume your program issues the SNAX/HLS
verb SEND-AND-RECEIVE-DATA, but does not wait for the completion (using the
file-system’s nowait I/O). After some amount of time or when some asynchronous
event is detected, your program wishes to perform some bookkeeping function or to
send some type of inquiry to the partner LU. To accomplish this, you issue CONTROL
26,0 on the file that was used to send the verb request. The CONTROL request
completes promptly, and the WRITEREAD is also completed, either with a reply code
of 0, 187, or 189.
If the completion was 0, you can conclude that the SEND-AND-RECEIVE-DATA
request was just about to complete when you decided to issue the CONTROL. You
should then examine the data that arrived and act accordingly.
If the completion code was 187, the send portion has completed, but no data was ready
from the partner. You now do whatever bookkeeping functions you wish. Where
suitable, you could even issue a SEND-DATA verb to obtain information from the
partner, since it had nothing to send for a while.
If the completion code was 189, the send portion of the request had not yet completed.
Although you can perform bookkeeping functions, you probably should not issue any
more verbs because the send operation is still going on. The only verbs you can safely
issue are RECEIVE-DATA or RECEIVE-CONTROL-WAIT, to await the actual end of
the previous send, or RECEIVE-CONTROL to sample the ending conditions.
To summarize:
If you issue CONTROL 26,1, the CONTROL completes with reply code 70. No
other requests are affected.
If you issue CONTROL 26,0, the CONTROL completes with reply code 0, and all
outstanding requests are completed. Depending upon what those requests were
doing, they bear a reply code of 0, 187, or 189. Other reply codes might be
generated by the file system, such as 201, but SNAX/HLS generates only the
values listed.