Application affinities
To fully realize the benefits of Parallel Sysplex® for CICS®, you must remove as many affinities as possible, because you do not want any transaction to be tied to the availability of any single CICS region.
To achieve your availability goals, you need to be able to maintain application availability across both planned and unplanned CICS region outages. By removing all affinities, and providing multiple regions with the same capabilities, you can deliver service to all CICS transactions regardless of which CICS regions are active or inactive.
- Inter-transaction affinity
An inter-transaction affinity is an affinity between two or more CICS transactions. It is caused by the transactions that use techniques to pass information between one another or to synchronize activity between one another in a way that requires the transactions to execute in the same CICS region.
Inter-transaction affinities, which impose restrictions on the dynamic routing of transactions, can occur under the following circumstances:- One transaction terminates and leaves state data in a place that a second transaction can access only by running in the same CICS region as the first transaction.
- One transaction creates data that a second transaction accesses while the first transaction is still running. For this to work safely, the first transaction usually waits on an event, which the second transaction posts when it has read the data that the first transaction created. This synchronization technique requires that both transactions are running in the same CICS region.
- Transaction-system affinity
A transaction-system affinity is an affinity between a transaction and a particular CICS region. It is caused by the transaction interrogating or changing the properties of the CICS region. Transactions with an affinity to a particular CICS region, rather than to another transaction, are not eligible for dynamic transaction routing. Typically, they are transactions that use CICS SPI commands, such as EXEC CICS INQUIRE or SET, or that depend on global user exit programs.
- Unit of Work
A Unit of Work affinity is where there are multiple requests in the same transaction (UOW) that update a shared resource. For example, a DB2 row or a VSAM record.
- Affinity relations: The most important are global, LU-name, and user ID, because these determine how the dynamic routing program can select a target region for an instance of the transaction.
- Affinity lifetime: determines when the affinity is ended.
As far as possible, remove affinities from your systems. Affinities can stop you from being able to run instances of an application on multiple systems due to several of the required resources being unavailable. In a CICSplex environment, if all affinities are removed, it is possible to keep the application running on the other regions in the CICSplex, thus masking any outage from the users. When you examine the affinities that exist, it is important to not look at a single application in isolation, but to consider all applications, as one might place a restriction on others.
CICS provides a number of alternatives to help you address existing affinities, many of which can be used without changes to your applications.
For more information about the impact of affinities in a CICSplex, see the IBM® Redbooks® publication Parallel Sysplex Application Considerations SG24-6523. For more information about how to identify affinities by using CICS Interdependency Analyzer, see the IBM Redbooks publication IBM CICS Interdependency Analyzer SG24-6458. For more information about CICS Interdependency Analyzer, see CICS Interdependency Analyzer for z/OS. For more information about affinities, see Affinity.
Use of the CICS ENQ capability can also introduce affinities