# DB2 Access Considerations

The CICS region with which Substation ES interfaces is called the SOR. An application that runs the CICS region is called the AOR.

Note: The default transaction ID under which Substation runs programs is SXEX.

You can define CICS programs to access DB2 in the following ways:

- The program executes in the SOR that can execute under the `SXEX` transaction ID.

  This is the typical Substation ES method of executing a CICS program. Define the recipe as you would a normal recipe. In the Recipe Details panel, do not set a value for the Mirror Tran field and set User Tran to `N`.

- The program executes in the SOR and must execute under a transaction ID other than `SXEX`.

  Two variations apply:

  - The transaction ID to execute the program cannot point to the program DFHMIRS.

    In the Recipe Details panel, set User Tran to `Y`. The transaction then starts as CICS Mirror Transaction (CSMI)， and then switch to the Mirror Tran field.

  - The transaction ID to execute the program can point to program DFHMIRS.

    Define the transaction to execute DFHMIRS. In the Recipe Details panel, set Mirror Tran to the transaction ID under which the program must run. Set User Tran to `N`.

- The program executes in AOR that can execute under the `SXEX` transaction ID.

  Define the recipe as you would a normal recipe. In the Recipe Details panel, do not set a value for the Mirror Tran field and set User Tran to `N`.

  Define the `SXEX` transaction in AOR as you would define it in SOR.

  The program definition in SOR must contain the REMOTE ATTRIBUTES for routing the program to the proper AOR for execution.

  Be sure to set up the program definition in AOR correctly.

- The program executes in AOR and must execute under a transaction ID other than `SXEX`.

  Define the recipe as you would a normal recipe. In the Recipe Details panel, Mirror Tran specifies the transaction ID under which the program must run. Set User Tran to `N`.

  Define the Mirror Tran transaction in SOR and AOR with the program name of DFHMIRS.

  The program definition in SOR must contain the REMOTE ATTRIBUTES for routing the program to the proper AOR for execution.

  Be sure to set up the program definition in the AOR correctly.

Copyright © TIBCO Software Inc. All rights reserved.