int xa_close(char *xa_info, int rmid, long flags);
Cette Application Program Interface (API) est fournie par le gestionnaire de ressources au moniteur transactionnel. Ce dernier décide des identifications.
La chaîne de déconnexion xa_info comprend généralement :
Les valeurs possibles du code retour sont les suivantes :
#include <xa.h>
static int rmid;
static xa_switch_t *XaSwitch;
...
if ((*XaSwitch->xa_open_entry)("UID=scott,PWD=tiger,DB=db2_aix,AXLIB=/usr/ups/upsvtm/bin/libupsoms.a,HOLD_CURSOR=T,SUSPEND_CURSOR=F", rmid, TMREGISTER)!=XA_OK)
{
...
}
...
if ((*XaSwitch->xa_close_entry)("UID=scott,PWD=tiger,DB=db2_aix,AXLIB=/usr/ups/upsvtm/bin/libupsoms.a", rmid, TMNOFLAGS)!=XA_OK)
{
...
}
...