BEA TUXEDO system global variable for an application-specified return code
#include <atmi.h>
tpurcode
is a global variable defined in atmi.h
. Its value is the same long integer used as the value of the rcode
argument of tpreturn
(3c). tpurcode
may be used by the application to return additional information to the process that calls an application service. For details, see tpreturn
(3c).
Assigning meanings to values in tpurcode
is the responsibility of the application.
Following are examples showing the use of tpurcode
:
If you return the value myval
through rcode
in an application service:
.
.
.
tpreturn(TPSUCCESS, myval, rqst->data, 0L, 0);
.
.
.
Then the code in the client module might be as follows:
.
.
.
ret = tpcall("TOUPPER", (char *)sendbuf, 0, (char **)&rcvbuf, \ &rcvlen, (long)0);
.
.
.
(void) fprintf(stdout, "Returned string is: %s\n", rcvbuf);
(void) fprintf(stdout, "Returned tpurcode is: %d\n", tpurcode);
If we call the sample client, simpcl
, with the value of "My String," the output will look like this:
Returned string is: MY STRING%simpcl "My String"
Returned tpurcode is: myval
The significance of myval
must be defined by the application.
tpreturn
(3c)