A. Building CICS/6000 Programs on UNIX : How You Configure CICS/6000 with Ingres DTP : Step 4: Build the Switch Load File
 
Share this page                  
Step 4: Build the Switch Load File
The SwitchLoadFile attribute (illustrated in the cicsadd command shown in the preceding step) must specify an object file that contains the “xa_switch_t” structure definition. This structure provides a table of XA entry points for use by the transaction monitor (TM) libraries. The Ingres DTP switch load file must be defined to:
Set “cics_xa_switch” to point to the XA switch structure
Call the CICS XA function cics_xa_init
You can use the following C code to build an Ingres DTP switch load file. To correspond with the cicsadd example in the preceding step, store this code in a text file named “iixa.c”.
Example: Ingres DTP switch load file built with C code
/* iixa.c */
#include <stdio.h>
#include <xa.h> /* Encina XA header file */
#include <iixa.h> /* INGRES XA header file */
extern struct xa_switch_t RegXA_xa_switch;
extern struct xa_switch_t *cics_xa_switch;
struct IIXA_SWITCH *iixa(void)
{
 cics_xa_switch = &iixa_switch;
 cics_xa_init();
 return(&RegXA_xa_switch);
}