OSI/MHS P7 Application Programmatic Interface (P7 API) Manual
Introduction to the P7 API
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual—424825-001
1-2
The P7 API
The P7 API
The P7 API product is Compaq’s implementation of an API that provides the services of 
a P7 message store access protocol. The P7 protocol is the means by which an X.400 
user agent submits messages to and retrieves messages from the message store of an 
X.400 message handling system (MHS).
Although the Compaq P7 API is not based on any X.400 API standards, it is modeled 
after X.229:  Remote operations: protocol specification, in Recommendations X.220-
X.290 (1988). The P7 API enables client applications to access the services associated 
with the P7 protocol. It acts as a conduit that transfers PDUs containing P7 encoded 
operations data between a client application and the OSI/MHS subsystem. Client 
applications written using the P7 API procedures can perform P7 operations on 
messages in the message store without using the services of the underlying OSI layers. 
The following subsections describe the P7 API components and the OSI/MHS 
components used by the P7 API.
P7 API Components
The P7 API consists of a procedural interface, external declaration files used by the 
client application to access the procedures, and a P7 API object file. The interface 
includes procedures to initialize the environment, begin and end sessions, and perform 
P7 operations.  The external declarations contain definitions of the parameters in the 
procedures. The object file contains the executable code for the P7 API procedures.
You can call the P7 API procedures from programs written in the C language or in the 
Transaction Application Language (TAL) if the TAL program is called from a C main 
program. Declaration files are provided in TAL and C.
You can include the declaration files in the client application when the application is 
compiled. You can either bind the P7 API object file into the client application when 
the application is compiled or bound, or you can treat the P7 API object file as a user 
library file that is used to resolve undefined externals at run time. For more information 
on creating an executable program, see “Creating an Executable Program” in Section 2. 
OSI/MHS Components Used by the P7 API
When you call a P7 API procedure from your client application, the P7 API passes the 
request for services to a local operations (LO) group in the OSI/MHS subsystem. P7 
operations, such as LIST and FETCH, are then passed from the LO group to the 
message store (MS) group servicing this user. P7 SUBMIT operations are passed from 
the LO group to either the MS group or to the message relay (MR) group. Within the 
OSI/MHS subsystem, the MHS manager process (MHSMGR) monitors and controls the 
LO groups.  Figure 1-2 shows these processes.
Note. The P7 API does not include the facilities to perform ASN.1 encoding and decoding of 
the data sent to and received from the OSI/MHS subsystem; those facilities can be part of the 
client application or part of any user code bound into the client application. If they are 
contained in the client application, the client application must write the encoding and decoding 
facilities by hand or use an ASN.1 compiler.










