Exchange/SNA Manual
Programming Considerations
Using the Exchange/SNA Programmatic Interface
104700 Tandem Computers Incorporated 4–3
6. Your program calls AWAITIO to wait for (or check on) the completion of the I/O
operation initiated in Step 1. Depending on how you code the call to AWAITIO,
your program can wait (suspend) until the I/O operation is completed or your
program can continue executing even if the I/O operation is not yet complete (in
which case your program must call AWAITIO again to complete the I/O
operation).
7. Assuming that you code the call to AWAITIO to wait for completion of the I/O
operation (or that the I/O operation has completed already), the operating system
sets the condition code indicating the success or failure of the I/O operation and
starts the execution of your program again.
If you set a time limit for the AWAITIO call, the value should be long enough to
account for a slow response time on the host side. Otherwise, you may receive
some false failures, where the request is being processed correctly but the call
times out (and returns an error) before the operation completes.
The above description assumes a single outstanding nowait I/O operation on a single
file. In practice, this is not always the case. To identify individual I/O operations
when several operations can be outstanding at once, the I/O procedures use a tag
parameter. The tag parameter is a number your program assigns to each nowait I/O
operation. The AWAITIO procedure returns this number to your program when that
I/O operation has completed. Your program then examines the returned tag
parameter to identify which I/O operation has completed.
The Exchange/SNA line server allows only one outstanding nowait I/O operation
against each subdevice. For some programs, this can make the use of the tag
parameter unnecessary. However, a program may require the tag parameter to
identify I/O operations performed on other files. In this case, the tag parameter is
required on a call to AWAITIO if that call to AWAITIO can complete an I/O operation
against one of the files with several outstanding nowait I/O operations.