OSI/AS Programming Manual
Establishing a Connection
APS Procedures Programming Concepts
2–28 056783 Tandem Computers Incorporated
Establishing a Connection
as the Calling User
Table 2-12 gives the sequence of procedure calls needed to establish a connection as
the calling user, together with a statement of what you are asking OSI/AS to do in
each case. The procedure calls in square brackets can sometimes be omitted,
depending on the context. The sequence of procedures is explained after the table.
The table shows the sequence of procedures to initiate a successful connection. Some
possible error conditions are included in the detailed explanation that follows the
table.
Table 2-12. Sequence of Procedures to Establish a Connection as the Calling User
Procedure What You’re Asking OSI/AS
[APS_INITIALIZE_ ] (Before first connection) Initialize the API.
APS_ASSOC_CONNECTREQ_ Connect me to a remote application.
[MFM_AWAITIOX_ ] (Nowait) Await completion; check status.
[APS_ASSOC_GETPARAM_ ] (Optional) What are the OSI addresses?
APS_EVENT_RECEIVE_ Give me the next event.
[MFM_AWAITIOX_ ] (Nowait) Await completion; check status.
APS_STATUS_ Is the event a connect confirm?
APS_ASSOC_GETPARAM_ Has the remote application accepted?
[APS_DATA_GETPARAM_ ] (Optional) Give me the confirm data.
The following steps explain the sequence of procedure calls given in Table 2-12:
1. If your application has not already done so, you must first call APS_INITIALIZE_
(see “Initializing the API,” earlier in this section).
2. To request a connection to an application on a remote OSI system, call
APS_ASSOC_CONNECTREQ_ , giving details about the connection you wish to
establish or reuse (if you are going to reuse an existing static subdevice); use
service-id
to specify whether this should be a session, presentation, or ACSE
connection. The information you must give is described under
APS_ASSOC_CONNECTREQ_ in Section 3. The procedure returns a CEPI and, if
successful, the status ZAPS-VAL-STATUS-OK.
For a presentation or ACSE connection, also specify the presentation context
definition list and other relevant parameters, as described under the
APS_ASSOC_CONNECTREQ_ procedure in Section 3.
If the procedure fails, it returns a status code other than ZAPS-VAL-STATUS-OK
and a CEPI of -1. To obtain details of an error at this stage, call APS_STATUS_
with the returned CEPI.
3. If the connection is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the procedure. MFM_AWAITIOX_ gives you the status code for the
completed procedure call. If the status is not ZAPS-VAL-STATUS-OK, call
APS_STATUS_ , specifying the CEPI you received in step 2.