When an event or an error occurs, XATMI functions return the return code -1. The program must evaluate the tperrno variable to determine the event or error more precisely.
With the conversational function tprecv, tperrno=TPEEVENT
indicates that an event has occurred. This event can be determined by evaluating the tprevc parameter revent. For example, the successful termination of a conversational service is indicated as follows:
Return code of tprecv =-1 tperrno=TPEEVENT revent=TPEV_SVCSUCC
The revent parameter is of no significance with the tpsend function.
Furthermore, at the end of the service function the service program can return a freely defined error code with tpreturn in the rcode parameter; this error code can be evaluated on the client side using the external variable tpurcode, see the X/Open Specification “Distributed Transaction Processing: The XATMI Specification”.