Provides the information required to build the IBM DB2 RM switch module.
Restriction: This topic applies only when the Enterprise Server feature is enabled.
- Source Code
- The IBM DB2 RM switch module COBOL source file,
ESDB2XA.CBL is located by default in the
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2012\src\enterpriseserver\xa directory.
- Building the Switch Module
- You can use either of the following methods to build the IBM DB2 switch module:
- Method 1
-
- Start aVisual COBOL command prompt, 32-bit or 64-bit depending on the application, running as an administrator.
- Change to the
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2012\src\enterpriseserver\xa directory (default location).
- Enter
build db2
- Method 2
-
- Start aVisual COBOL command prompt, 32-bit or 64-bit depending on the application.
- Copy all files from the
%ProgramFiles(x86)%\Micro Focus\Visual COBOL for Visual Studio 2012\src\enterpriseserver\xa directory (default location) to any location where you have WRITE permission.
- Change to the directory containing the copied files.
- Enter
build db2
- Build Output
- The build process produces two binary files from the
ESDB2XA.CBL COBOL source file:
Binary File
|
Type
|
ESDB2XA.DLL
|
static
|
ESDB2XA_D.DLL
|
dynamic
|
You can register an RM switch module with
Enterprise Server dynamically, or register it statically depending on which binary file you use. We recommend that you use the dynamic switch module option, as this ensures that only active databases used in the global transaction participate in the TM/RM XA flow.
- Additional Resources
- For more information on using the IBM DB2 RM switch module, including the
open string definition and details of supported SQL operations, see the following:
- The
Database Access - DB2 ECM section of the
Additional Software Requirements topic.
- The
Transaction Managers help topic available in the IBM RDBMS documentation.
- DB2 9.1 - The
X/Open XA Interface programming considerations help topic available in the IBM RDBMS documentation.