OSI/AS Programming Manual

Calling an APS Procedure
APS Procedures Programming Concepts
056783 Tandem Computers Incorporated 2–25
Calling an APS
Procedure
You use the same set of APS procedures to access services of the Session Layer, the
Presentation Layer, and ACSE. You can establish and use connections at different
layers in the same program; use
service-id
in APS_ASSOC_ATTACH_ or
APS_ASSOC_CONNECTREQ_ calls to indicate whether each connection is to be a
session, presentation, or ACSE connection. Some procedure parameters apply only to
particular layers.
Note If you specify a parameter that does not apply to the layer you are using (as specified by the service-id
parameter), OSI/AS usually ignores that parameter. An error generally is not returned.
For detailed calling sequences for all of the procedures, see Section 3.
Types of APS Procedures APS procedures can be grouped into several categories, depending on what types of
operations they perform or initiate. Table 2-11 shows the following information:
Which procedures invoke session, presentation, or ACSE primitives
Which procedures cause file-system I/O operations and, therefore, should be
completed with MFM_AWAITIOX_ if in nowait mode
Note that all of the procedures that invoke primitives also cause file-system
operations.
Procedures that do not cause file-system I/O operations are “local”; that is, they
operate only within your application process. Do not call MFM_AWAITIOX_ to
complete local procedures.
Status and Error
Information
Most APS procedures return a status code. The status code shows that the procedure
has been successful or that an error has occurred. In the case of an error, the status
code indicates the appropriate recovery action. If you wish to get detailed error
information, call the APS_STATUS_ procedure immediately after completion of the
procedure call about which you want information. (APS_STATUS_ provides
information only on the most recently completed primitive or the most recently
received event; information on earlier primitives and events is not queued.)
The APS_EVENT_RECEIVE_ procedure uses the status code ZAPS-VAL-STATUS-
EVENT to indicate that an event has been received. Call APS_STATUS_ immediately
after the APS_EVENT_RECEIVE call to find out which event has been received.
In nowait mode, the MFM_AWAITIOX_ procedure returns further status information,
showing successful completion, an error, or the arrival of an event.
Some APS procedures (APS_INITIALIZE_ , APS_STATUS_ , and the procedures
ending in _GETPARAM_) directly return an error code, not a status code.
Status and error codes are listed in Appendix B.