Get the resource manager ID
When specifying how user-defined routines register and unregister a data source using the ax_reg() or ax_unreg() function, you can use the mi_xa_get_xadatasource_rmid() function to get the resource manager ID that was previously created in the database for an XA-compliant, external data source.
The mi_xa_get_xadatasource_rmid() function can be used while invoking the ax_reg() or the ax_unreg() function in subsequent calls.
The syntax for the function is:
mi_integer mi_xa_get_xadatasource_rmid(mi_string *xasrc)
The xasrc parameter is the user-defined name of the XA data source.
For example:
#include "xa.h"
#include "milib.h"
int rmid;
rmid = mi_xa_get_xadatasource_rmid("informix.Newyork");
if (rmid <= 0)
{
/* Error while getting XA data source id */
}
/* Successful */
For more information about this function, see the IBM® Informix® DataBlade API Function Reference.