Inter-transaction affinity considerations in a CICSplex

A CICSplex consists of two or more CICS® regions that are linked using CICS intercommunication facilities. A CICS function known as dynamic transaction routing supports load balancing by dynamically routing a transaction from a terminal to any of the regions that have the resources to process the transaction.

Inter-transaction affinity occurs when two or more CICS transactions pass information to one another in a way that requires the transactions to run in the same CICS region. When inter-transaction affinity exists, you must define the transactions to CICS so that they are routed to the same region.

The following topics describe transaction routing considerations for CICS programs generated using EGL. For a more complete discussion of transaction routing, see Dynamic Routing in a CICSplex, SC33-1012.

Segmented programs

Segmented programs use a temporary storage queue (the work database) for saving the state of the program conversation during a converse or show statement. All segments of the conversation must have access to the same temporary storage queue and must continue to use the same terminal ID.

Sharing EGL DataTables for update

Programs can update shared EGL DataTables in the CICS environment. The shared DataTable is stored in memory obtained through a CICS GETMAIN; any updates are accessible only to programs running in the same region. Any transactions dependent on passing information through a shared DataTable must be routed to the same region.

Temporary storage queues

EGL support for temporary storage queues requires that access to the queues be serialized. The generated program does this by using CICS ENQ and DEQ with the queue name as the resource name. ENQ and DEQ are effective only within the scope of a single region. To ensure that access to the queue is serialized, do one of the following:
  • Define the temporary storage queue as a local queue.
  • Route all transactions that access the queue to same region.
  • Use a queue naming convention that includes the terminal ID from sysVar.terminalID as part of the queue name, so that a different queue is used for each terminal. Since only one transaction is active from any one terminal at a time, access to the queue is serialized.

Refer to the CICS manual for more information on using temporary storage queues with transaction routing.

Using a transient data queue for printed output

Printed output can be routed to a transient data queue. The program accumulates the printed output in a temporary storage queue. When the output is complete, the program copies the output to the transient data queue, using ENQ/DEQ to ensure that output from multiple transactions in the same system is not interspersed.

Because ENQ/DEQ are effective only within a region, define the queue as a local queue to prevent interspersed output from multiple regions.

Also, if you have defined the queue to trigger the FZETPRT terminal printing program, define the transaction for FZETPRT as a local transaction in the region where the queue resides.

Error destination queque

Error messages from Rational® COBOL Runtime can be directed to a transient data queue called the error destination queue. Define the queue as a local queue to each region in which an EGL program can run to ensure that messages related to a single error are not interspersed with messages related to another error occurring at the same time in another region.

Disable on run unit failure

One of the options that can be specified using the diagnostic control utility is disabling a transaction whenever a run-unit error is detected for that transaction.

The disable action is implemented using the CICS SET function and is effective only for the region in which the error occurred.

CICS utility function region affinity

The Rational COBOL Runtime CICS utilities perform functions that have region affinity; therefore, you must ensure that the transaction is routed to the desired region based on the user identifier, LU name, or alternate transaction name. The following table lists the utilities, default transaction identifier, and function description.

Table 1. Region Dependent Utilities
Utility Default ID Function Description
CICS Utilities Menu ELAM Menu for selecting the other utilities (except trace).
New Copy ELAN Loads new copy of program, library, service, FormGroup, or DataTable in region
Diagnostic Message Print ELAU Prints error message queue associated with the region.
Diagnostic Control Options ELAC Sets error reporting options for Rational COBOL Runtime. Is region dependent if option file (RDO FILE name ELACFIL) is defined as local to each region; is not region dependent if ELACFIL is defined as a shared file accessed through a file owning region.
Trace ELAZ Trace options set by this utility are saved in memory obtained through a CICS GETMAIN in the region and are effective only in the region in which the ELAZ transaction ran.

Feedback