Adding affinities into a workload

For non-Link3270 bridge transactions, affinities are managed by CICSPlex® SM Transaction affinity relation and lifetime fields in the workload management views. You specify these fields to isolate transactions to particular systems and to define affinity types and lifetimes.

Figure 1 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 can use the same workload specification for workload routing and separation.
Figure 1. 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 EYUMAS1 B 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 user ID, 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.
  • If the transaction is defined to a transaction group, CICSPlex SM notes the match key for that group.
  • If the transaction is not part of a transaction group, CICSPlex SM uses the match key from the default transaction group for the workload specification.
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 is to be directed:
  • If the terminal and user names associated with the transaction match the selection criteria specified in an installed workload definition, CICSPlex SM checks to see if an affinity relation and lifetime are associated with the transaction group.
    • When an affinity relation and lifetime are associated with the transaction group:
      • If it is the first occurrence, CICSPlex SM notes the affinity relation and lifetime. Based on target region availability, CICSPlex SM then selects a target region and directs the transaction to it.
      • If it is not the first occurrence, CICSPlex SM routes the transaction to the previously selected target region. As long as the affinity relation and lifetime are applicable, subsequent occurrences of any transaction in the transaction group are directed to the same target region.
    • When no affinity relation and lifetime are associated with the transaction group, the transaction is routed to the most appropriate target region in the designated set of target regions.
  • If the terminal and user names do not match the selection criteria, the transaction is routed to the default set of target regions identified in the workload specification. One is selected based on the status of the active target regions in that set.
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.