Taking affinity relations into consideration

An affinity is a relationship that you define between two or more transactions and the duration (or lifetime) of that relationship. When an affinity relationship exists between transactions, those transactions must be processed by the same target region. You can use affinities to route transactions from one or more requesting regions to a specific target region based on the rules applying to a particular combination of an affinity relation and lifetime. For a list of affinity relation and lifetime values, see Valid affinity relation and lifetime combinations and their meanings.

Start of changeWhen multiple CMASs in the CICSplex manage affinities for the workload, and one of these CMASs is brought down and the local MASs stay up, the workload becomes frozen. When the workload is frozen, it cannot be changed, however the current workload remains active.End of change

Start of changeWhen a CMAS is down, and you have any of the following affinity life times and affinity relationships, a new affinity instance cannot be created, and the transaction cannot be routed to the target MAS associated to the to the affinity, because the local TORs cannot be informed of the workload changes while the workload is frozen.End of change

Table 2.
Affinity relation Affinity Lifetime
USERID
  • SYSTEM
  • PERMANENT
LUNAME
  • SYSTEM
  • PERMANENT
GLOBAL
  • SYSTEM
  • PERMANENT
BAPPL
  • SYSTEM
  • PERMANENT
  • ACTIVITY
  • PROCESS

Start of changeWhen the CMAS is brought back up and reconnects to the MASs, the workload is un-frozen and is able to be changed.End of change

Start of changeYou can use the IBM® CICS Interdependency Analyzer for z/OS® to detect existing affinities between transactions and between BTS processes and activities. The output from the Reporter component of that utility can be used as input to the CICSPlex® SM batched repository-update facility. For more information, see the CICS Interdependency Analyzer for z/OS User's Guide and Reference.End of change

Note:
You cannot use the IBM CICS Interdependency Analyzer for z/OS to detect affinities between non-terminal-related EXEC CICS START commands, and between DPLs that are not associated with either a user id or a terminal id. For these request types, you should try to remove or avoid all affinities, and ensure that your applications can honor any remaining affinities.

CICS BTS considerations

Although BTS itself does not introduce any affinities, and discourages programming techniques that do, it does support existing code that may introduce affinities. You must define such affinities to workload management. It is particularly important to specify each affinity’s lifetime. Failure to do this may restrict unnecessarily the workload management routing options.

It is important to note that a given activity can be run both synchronously and asynchronously. Workload management is only able to honour invocations that are made asynchronously. Furthermore, you are strongly encouraged not to create these affinities, particularly activity and process affinities, because these affinities are synchronized across the BTS-set. This could have serious performance impacts on your systems.

You should also note that, with CICSPlex SM, the longest time that an affinity can be maintained is while a CMAS involved in the workload is active; that is, an affinity of PERMANENT. If there is a total system failure, or a planned shutdown, affinities will be lost, but activities in CICS will be recovered from the BTS RLS data set.

Enterprise bean considerations

The CICSPlex SM affinity services have no facilities for the management of affinities between enterprise beans. Transaction affinity relation and lifetime fields in the workload management views should be left blank.

Link3270 bridge considerations

For Link3270 bridge transactions, affinities are managed by CICS® and not by CICSPlex SM. Transaction affinity relation and lifetime fields in the workload management views should be left blank.

Adding affinities into a workload

Figure 7 illustrates how you might separate the work in a workload based on transaction identifiers and then associate an affinity relation and lifetime with those transactions. With this example, the first occurrence of a transaction named PAY1, where the associated terminal and user names are NET1 and SMITH, respectively, is directed to the appropriate target region within the set of target regions identified as EYUCSG05. The specific target region receiving the transaction and the affinity relation and lifetime associated with the transaction group to which PAY1 belongs are noted. All subsequent occurrences of any transaction in the transaction group that meet the terminal and user name criteria are directed to the same target region for the designated period of time.

Note:
If you do not specify a default affinity relation and lifetime, then you may use the same workload specification for workload balancing and separation.
Figure 7. Sample definition adding transaction affinity to a workload
 The diagram illustrates the adding of an affinity to a workload. Two MVS systems, System A and System B are shown. System A has a CMAS, EYUCMS1A and four MASs, EYUMAS1A (a TOR), EYUMAS2A (an AOR), EYUMAS3A (an AOR) and EYUMAS4A (a FOR). System B has a CMAS, EYUCMS1B and a MAS, EYUMAS1B (an AOR). Sysplex EYUPLX01 contains all the MASs from both systems. System Group EYUCSG01 contains all three AORs (across both systems) and the FOR.. EYUMAS1B is also contained in system group EYUCSG05. EYUCMS1A is the maintenance point for CICSplex EYUPLX01. There is a connection between the two CMASs.The definition for workload EYUWMD03 in the data repository specifies Trangrp as EYUWMT01, Luname as NET* Userid as SM* and Process Type as *. The Target Scope is EYUCSG05 and the Group is EYUWMG3. The definition for workload group EYUWMG03 associates definition EYUWMD03 with specification EYUWMS04. The specification for workload EYUWMS04 specifies Target Scope as EYUCSG01, Routing scope as EYUMAS1A and Group as EYUWMG03. The definition for transaction group EYUWMT01 specifies Match as luname/userid, Affinity as USERID, Lifetime as SIGNON and Tranid as PAY1, PAY2, INV1 and INV2.
Note:
During workload processing, CICSPlex SM evaluates the transaction identifier supplied by CICS to determine which transaction group to use. CICSPlex SM uses this value to establish the order in which the terminal and user names associated with the transaction are to be evaluated. The evaluation is to determine where the transaction should be directed:
Note:
When transactions in a series of terminal-initiated transactions are associated with separate transaction groups, affinities for each transaction group follow the rules defined for that transaction group.

Related concepts
Workload management and dynamic routing
Workload requirements
Establishing a workload
Balancing the work in a workload
Separating the work in a workload
Taking abend probabilities into consideration
[[ Contents Previous Page | Next Page Index ]]