OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

5.1.2 XATMI interface functions

This subsection explains the XATMI interface facilities which are available with each application programming interface under each communication protocol.

Organization of this subsection
(1) XATMI interface library functions
(2) Relationship between XATMI interface facilities and communication protocols

(1) XATMI interface library functions

Table 5-1 lists the XATMI interface library functions.

Table 5-1 XATMI interface library functions

XATMI interface facilities Library function name
C language library COBOL language library
Request/
response service paradigm
Send a service request and synchronously await its reply tpcall() TPCALL
Send a service request tpacall() TPACALL
Get a reply from a previous service request tpgetrply() TPGETRPLY
Cancel a call descriptor for an outstanding reply tpcancel() TPCANCEL
Conversational service paradigm Establish a conversational service connection tpconnect() TPCONNECT
Terminate a conversational service connection abortively tpdiscon() TPDISCON
Receive a message in a conversational connection tprecv() TPRECV
Send a message in a conversational connection tpsend() TPSEND
Manipulation of communication data types Allocate a typed buffer tpalloc() --
Free a typed buffer tpfree() --
Change the size of a typed buffer tprealloc() --
Determine information about a typed buffer tptypes() --
Dynamic management of service names Advertise a service name tpadvertise() TPADVERTISE
Unadvertise a service name tpunadvertise() TPUNADVERTISE
Functions used by server Template for (entity of) service routines# tpservice() --
Start a service routine# -- TPSVCSTART
Return from a service routine tpreturn() TPRETURN

Legend:
--: There is no counterpart API function.

#
Since the method for declaring the start of a service is different between C and COBOL, separate API components are provided in these languages. The function tpservice() denotes the entity of the service in C.

Table 5-2 gives the relationship between XATMI interface functions and OpenTP1 UAPs.

Table 5-2 Relationship between XATMI interface functions and OpenTP1 UAPs

XATMI interface function SUP SPP MHP Off- line
Outside Inside Outside Transaction processing range Outside Inside
Root Not root
tpacall() Y Y Y Y Y -- -- --
tpadvertise() -- -- Y#1 Y#1 Y#1 -- -- --
tpalloc() Y Y Y Y Y -- -- --
tpcall() Y Y Y Y Y -- -- --
tpcancel() Y Y Y Y Y -- -- --
tpconnect() Y Y Y Y Y -- -- --
tpdiscon() Y Y Y Y Y -- -- --
tpgetrply() Y Y Y Y Y -- -- --
tpfree() Y Y Y Y Y -- -- --
tprecv() Y Y Y Y Y -- -- --
tprealloc() Y Y Y Y Y -- -- --
tpreturn() -- -- Y#2 Y#2 Y#2 -- -- --
tpsend() Y Y Y Y Y -- -- --
tpservice()#3 -- -- -- -- -- -- -- --
tptypes() Y Y Y Y Y -- -- --
tpunadvertise() -- -- Y#1 Y#1 Y#1 -- -- --

Legend:
Outside: Outside transaction range
Inside: Inside transaction range (root)
Off-line: UAP that handles offline work
Y: The function can be used with UAPs.
--: The function cannot be used with UAPs.

Note
The outside the transaction range for MHP means the range of MHPs with the nontransaction attribute or the main function of MHPs.

#1
Can be called only within service functions.

#2
Used only to make XATMI-interfaced service functions return.

#3
tpservice() is the entity of the service function.

(2) Relationship between XATMI interface facilities and communication protocols

The XATMI interface can be used for both TCP/IP communication and OSI TP communication. However, there may be restriction on some facilities depending on the communication protocol. Table 5-3 gives the relationship between XATMI interface facilities and communication protocols.

Table 5-3 Relationship between XATMI interface facilities and communication protocol

XATMI interface facility Communication protocols
TCP/IP OSI TP
Request/response service paradigm Y Y
Conversational service paradigm Y --
Typed data transmission Y Y#
Client/server mode communication between OpenTP1 systems Y Y
Transaction extension to other TP monitors -- Y

Legend:
Y: Can be used under this communication protocol.
--: Cannot be used under this communication protocol.

#
When OSI TP is used for client/server mode communication with non-OpenTP1 system, data can be transmitted if its type is appropriately converted. For the communication data types that can be specified, see 5.1.6 Communication data types.