OSI/AS Programming Manual
Establishing a Connection
APS Procedures Programming Concepts
056783 Tandem Computers Incorporated 2–29
4. Optionally, call APS_ASSOC_GETPARAM_ to obtain the OSI addresses of your
application and the remote application (if you specified only the application
names in the call to APS_ASSOC_CONNECTREQ_), and to obtain other
information for a presentation or ACSE connection.
5. Next, to be able to receive a connect confirm event, call APS_EVENT_RECEIVE_.
In wait mode, this procedure returns a status code of ZAPS-VAL-STATUS-EVENT
when you have received an event.
6. If the connection is in nowait mode, call MFM_AWAITIOX_ to wait for the
completion of the procedure and to obtain the status code. As above, a status code
of ZAPS-VAL-STATUS-EVENT means you have received an event.
7. If you have received an event, call APS_STATUS_ to find out which event it is. If
the event code is ZAPS-VAL-EVT-CONNECT-CNF, you have received a connect
confirm. (If the event code is some other value, see Table 2-2 for the next
procedures to call.)
8. Next, call APS_ASSOC_GETPARAM_ to find out the result of your connection
attempt. If the attempt was successful,
connect-result
has the value ZAPS-
VAL-CON-ACCEPT. (For more information about other ZAPS-VAL-CON-xxx
values and their meanings, see Appendix A.)
The value of
session-rqmnts
returned by APS_ASSOC_GETPARAM_
indicates what the remote application has requested for functional units, token
settings, and the synchronization point serial number. For functional units, only
those functional units requested by both sides are used on the connection. For
tokens, the remote application chooses the values where you specified “acceptor
choice.” For the synchronization point serial number, the remote application’s
choice prevails.
Note For token settings and for the synchronization point serial number, session-rqmnts indicates the result of
the negotiation. For functional units, the parameter simply indicates which units the remote application
has requested. You must then calculate the result of the negotiation for functional units yourself, based
on a comparison of the functional units selected by each side.
For presentation and ACSE connections, also check
pres-context-result-list
and other applicable parameters described
under APS_ASSOC_GETPARAM_ in Section 3. (For more information about
the presentation context definition result list, see “User Data Encoding,” earlier
in this section.)
9. To retrieve the user data (if any) the remote application has sent with the connect
response, call the APS_DATA_GETPARAM_ procedure. Note that you can
receive user data whether or not the connection is accepted.