xa_close()-- Close an XA Resource Manager (Transaction Scoped ,Locks)


  Syntax
 #include <xa.h>

 int xa_switch.xa_close_entry(char *xa_info,     
     int rmid, long flags);

  Default Public Authority: *USE

  Service Program: QTNXADTP

  Threadsafe: Yes

A transaction manager calls xa_close() to close a currently open resource manager in the thread of control. After this call, the resource manager cannot participate in global transactions on behalf of the calling thread until it is reopened.


Parameters

xa_info
(Input) A pointer to a 256-byte, null-terminated character string that contains information used to close the resource manager. No information is currently allowed in this string. It must be a null string or contain only blanks with a null terminator.

rmid
(Input) An integer value that the transaction manager generated when calling xa_open(). The rmid identifies the resource manager.

flags
(Input) The following are valid settings of flags.

TMNOFLAGS: 0x00000000L Perform the close operation normally.


Authorities

None


Return Value

-6 [XAER_PROTO]

xa_close() was not successful. The function was called in an improper context.

-5 [XAER_INVAL]

xa_close() was not successful. Incorrect arguments were specified.

-3 [XAER_RMERR]

xa_close() was not successful. The resource manager detected an error when it closed the resource.

-2 [XAER_ASYNC]

xa_close() was not successful. The resource manager does not support asynchronous operations.

0 [XA_OK]

xa_close() was successful.



Error Messages

The following messages may be sent from this function.

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


Related Information


Example

See Code disclaimer information for information pertaining to code examples.

#include <xa.h>

main() {
  char  *xa_info;
  int  rmid;
  long flags;
  int  retcode;
  extern struct xa_switch_t xa_switch;

  retcode =
     xa_switch.xa_close_entry(xa_info, rmid, flags);
}


API introduced: V5R2
Top | UNIX-Type APIs | APIs by category