Affinity

CICS® transactions and programs use many different techniques to pass data from one to another. Some of these techniques require that the transactions or programs exchanging data must execute in the same CICS region. This imposes restrictions on the regions to which transactions and distributed program link (DPL) requests can be dynamically routed and is said to create an affinity between them.

Java

This guidance on affinity between transactions describes applications written using the EXEC CICS API. However, many of the comments are equally valid for Java™ applications executing in a CICSplex. For guidance on developing Java applications, see Java programming using JCICS.

Transactions, program-link requests, EXEC CICS START requests, and CICS business transaction services (BTS) activities can all be dynamically routed.

You can use a dynamic routing program to dynamically route:
  • Transactions started from terminals
  • Transactions started by eligible terminal-related EXEC CICS START commands
  • Eligible CICS-to-CICS DPL requests
  • Eligible program-link requests received from outside CICS.
You can use a distributed routing program to dynamically route:
  • Eligible BTS processes and activities.
  • Eligible non-terminal-related EXEC CICS START requests.

For detailed introductory information about dynamic and distributed routing, see Introduction to CICS dynamic routing .

Important:

The following sections talk exclusively about affinities between transactions.

  • Affinities can also exist between programs. (Although, strictly speaking, we could say that it is the transactions associated with the programs that have the affinity.) This may impose restrictions on the regions to which program-link requests can be routed.
  • The sections on safe, unsafe, and suspect programming techniques apply to the routing of program-link and START requests, as well as to the routing of transactions.