The rcode value in the XATMI API function:
void tpreturn(int rval, long rcode, char *data, long len, long flags)
provides a way for the service to pass back a code to the service caller and should be available via the global variable tpurcode. Howver it allways contains the value 0 regardless of what value the service set rcode to.
[Note we have a unit test for this but it is single process whereas the current bug appears when the client and service are in different processes]