OSI/MHS P7 Application Programmatic Interface (P7 API) Manual
Planning and Writing Your Application
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual—424825-001
2-11
Creating an Executable Program
Retrieval Operations
Retrieval Operations. The P7 API supports the following retrieval operations:
•
LIST
•
FETCH
•
SUMMARIZE
•
DELETE
•
REGISTER-MS
When a client application issues a LIST, FETCH, SUMMARIZE, DELETE, or 
REGISTER-MS request, the LO group passes the request to the MS group. The MS 
group then processes the request and creates the response. The response PDU is formed 
in memory and is not stored in the MS PDU store.
Retrieving P7 Results and Errors
After you send a submission or retrieval operation to the OSI/MHS subsystem, you need 
to retrieve the operation result or error. To retrieve the result or error, you call the 
Guardian AWAITIOX procedure to wait for completion on the result file, followed by a 
call to LOS_DT_FINISH_RESULT_ to retrieve the result.
When the MS group generates a result or error for a P7 operation, it stores the result or 
error PDU in memory. When the client application calls LOS_DT_FINISH_RESULT_ 
, the result or error PDU is retrieved by the LO group from memory using interprocess 
communication.
Unbinding From an MS Group
All application associations are closed using an MSUNBIND request.  To unbind from 
an MS group and close the application association, you:
1. Call LOS_DT_SEND_ with the send file number, an empty buffer, and the 
dataType parameter set to ZMHS-VAL-DT-MS-UNBIND-ARG; then call 
AWAITIOX to wait for completion on the send file.
2. Call LOS_DT_FINISH_SEND_ to check for completion on the send file; then call 
AWAITIOX to wait for completion on the result file.
3. Call LOS_DT_FINISH_RESULT_ to retrieve the result or error.
Creating an Executable Program
The P7 API portion of the client application consists of a sequence of calls to the P7 API 
procedures. You can include the declaration files for these procedures in the client 
application when you compile the application.  You can either bind the object file 
containing the procedures into the application during the compile or bind steps, or you 
can treat the P7 object file as a user library file that is used to resolve undefined 
externals at run time.










