CICS Multi-Region Operation (MRO) Resource Management is a critical aspect of managing distributed CICS environments. MRO enables CICS regions running in the same z/OS image or sysplex to communicate and share resources efficiently. This guide covers the fundamentals of MRO resource management, including region types, interregion communication, resource sharing strategies, connection management, and performance optimization.
Multi-Region Operation (MRO) is a CICS facility that enables CICS regions in the same z/OS image or sysplex to communicate with each other without requiring SNA (System Network Architecture) networking facilities. MRO uses interregion communication (IRC) to provide fast, efficient communication between regions.
Key characteristics of MRO:
Imagine you have a big office building with many different departments. Each department (that's like a CICS region) has its own room, but they all work in the same building (the sysplex). MRO is like having a special phone system that lets all these departments talk to each other really quickly without needing to go outside the building.
Some departments have the computers where people type (TOR - Terminal-Owning Region), some have the programs that do the work (AOR - Application-Owning Region), and some have the filing cabinets with all the data (FOR - File-Owning Region). MRO lets them all work together smoothly, like when someone in the typing department needs information from a filing cabinet in another department - they can just call and get it quickly!
In an MRO environment, CICS regions can be assigned different roles based on the resources they own and manage. Understanding these roles is essential for effective resource management.
| Type | Full Name | Description | Typical Resources |
|---|---|---|---|
| TOR | Terminal-Owning Region | Connects terminals and devices to the CICSplex. Receives transaction requests and routes them to appropriate regions. | Terminals, printers, communication devices |
| AOR | Application-Owning Region | Manages application programs and business logic. Processes transactions routed from TORs. | Application programs, transactions, business logic |
| FOR | File-Owning Region | Manages access to files and databases. Handles function-shipped requests for data access. | VSAM files, databases, data resources |
A single CICS region can perform multiple roles. For example, a region might be both a TOR and an AOR, or an AOR and a FOR. The roles are not mutually exclusive - they describe the primary function of a region but don't prevent it from performing other functions.
123456789Example Configuration: - Region CICS1: TOR (handles terminals) + AOR (runs applications) - Region CICS2: AOR (runs applications) + FOR (owns files) - Region CICS3: FOR (owns critical databases) This allows: - Terminals connect to CICS1 - Applications run in CICS1 and CICS2 - Data access goes to CICS3 when needed via function shipping
Interregion Communication (IRC) is the internal CICS support that enables MRO. IRC provides the low-level communication mechanism that allows regions to exchange data and coordinate work.
IRC can be implemented using different mechanisms depending on your z/OS configuration:
The choice of implementation method depends on your z/OS version, sysplex configuration, and performance requirements. XCF/MRO is typically the most efficient for sysplex environments.
MRO provides several facilities that enable different types of resource sharing and communication between regions:
| Facility | Description | Use Case |
|---|---|---|
| Transaction Routing | Allows terminal users in one system to run transactions in another connected CICS system | Distribute transaction processing across regions |
| Function Shipping | Enables access to resources (files, queues) owned by another region | Share resources without duplicating data |
| Distributed Program Link (DPL) | Allows a program in one region to call a program in another region | Distribute application logic across regions |
| Distributed Transaction Processing (DTP) | Coordinates work across multiple transaction programs in different regions | Complex distributed business processes |
| Asynchronous Processing | Allows a transaction to initiate work in another region without waiting | Background processing and event-driven workflows |
Function shipping allows a program in one region to access a resource owned by another region. Here's how it works:
12345678910111213141516171819202122232425*> Program running in AOR (Application-Owning Region) IDENTIFICATION DIVISION. PROGRAM-ID. CUSTINQ. DATA DIVISION. WORKING-STORAGE SECTION. 01 CUSTOMER-RECORD. 05 CUST-ID PIC X(8). 05 CUST-NAME PIC X(30). 05 CUST-BALANCE PIC S9(9)V99 COMP-3. PROCEDURE DIVISION. *> This file is owned by FOR (File-Owning Region) *> CICS automatically ships the request to the FOR EXEC CICS READ DATASET('CUSTFILE') INTO(CUSTOMER-RECORD) RIDFLD(CUST-ID) END-EXEC. *> Process the customer data DISPLAY 'Customer: ' CUST-NAME DISPLAY 'Balance: ' CUST-BALANCE EXEC CICS RETURN END-EXEC.
When this program runs in the AOR and tries to read CUSTFILE, CICS detects that the file is owned by the FOR. It automatically ships the READ request to the FOR, where a mirror transaction (CSMI) processes it, and the result is shipped back to the AOR. This is transparent to the application program.
MRO connections are defined using CONNECTION resource definitions. Connections specify how regions communicate and what resources they can access.
Connections can be defined using CEDA (CICS resource definition) or RDO commands:
12345678910CEDA DEFINE CONNECTION(MROCONN) GROUP(MROGRP) DESCRIPTION('MRO Connection to Remote Region') NETNAME(REMOTEREG) PROTOCOL(MRO) ACCESSMETHOD(IRC) SESSIONLIMIT(100) MAXSESSIONS(200) TIMEOUT(300) SECURITY(USERID) STATUS(ENABLED)
Key connection attributes:
In MRO, you define both local and remote connections:
1234567891011121314*> Define local connection (how this region appears to others) CEDA DEFINE CONNECTION(LOCAL) GROUP(MROGRP) NETNAME(MYREGION) PROTOCOL(MRO) ACCESSMETHOD(IRC) STATUS(ENABLED) *> Define remote connection (how to reach another region) CEDA DEFINE CONNECTION(REMOTE1) GROUP(MROGRP) NETNAME(REGION1) PROTOCOL(MRO) ACCESSMETHOD(IRC) SESSIONLIMIT(50) STATUS(ENABLED)
When transactions execute across multiple regions in an MRO environment, CICS provides transaction tracking to link related work together. This is essential for monitoring, auditing, and problem determination.
Each transaction is assigned a Unit of Work ID (UOWID), which is a time value derived from the initial task attach time. The UOWID flows with the transaction as it moves between regions, allowing you to track all pieces of work related to the same logical transaction.
UOWID characteristics:
When a transaction executes across multiple regions (e.g., via transaction routing or function shipping), each region writes its own transaction record. These records can be linked together using UOWID and NETNAME:
1234567891011121314151617181920212223Example: Transaction AUPD routed from TOR to AOR, then function-shipped to FOR TOR Record: - UOWID: 3577:58:58.68 - NETNAME: STOR - Transaction: AUPD - Program: DFHCRP (relay program) - Duration: 00:00:00.349 AOR Record: - UOWID: 3577:58:58.68 (same UOWID) - NETNAME: STOR (originating region) - Transaction: AUPD - Program: DFH$AALL (application program) - Duration: 00:00:00.302 FOR Record: - UOWID: 3577:58:58.68 (same UOWID) - NETNAME: STOR (originating region) - Transaction: CSMI (mirror transaction) - Program: DFHMIR - Duration: 00:00:00.036 - File operations: 1 GET
Effective resource management in MRO requires careful planning of where resources are located and how they are accessed. Here are key strategies:
To minimize function shipping overhead, place application programs in the same region as the data they primarily access. This reduces cross-region communication and improves performance.
123456789Good Design: - Customer Inquiry Program → Place in FOR with customer files - Order Processing Program → Place in FOR with order files - Report Generation → Can be in separate AOR, uses function shipping Poor Design: - All programs in AOR, all files in FOR - Every file access requires function shipping - High overhead and slower performance
Distribute transaction processing across multiple AORs to balance workload and improve scalability:
Configure connection pools appropriately to balance resource usage and performance:
Clearly define resource ownership to avoid conflicts and optimize access:
Optimizing MRO performance requires understanding the overhead of interregion communication and minimizing it where possible.
Function shipping has overhead - each request must be serialized, transmitted, processed, and the result returned. Minimize function shipping by:
Efficient session management reduces overhead:
Use CICS monitoring facilities to track interregion communication:
MRO resource management must consider security implications:
Scenario: You have a CICSplex with three regions:
Questions:
Task: Design connection definitions for an MRO environment with:
Requirements:
Write the CEDA commands to define these connections.
Scenario: You notice high function shipping activity between your AOR and FOR regions. Analysis shows that 80% of function-shipped requests are for the CUSTFILE.
Questions:
1. What does MRO stand for in CICS?
2. Which region type owns terminals and routes transactions in an MRO environment?
3. What is the primary mechanism that enables MRO communication?
4. Which MRO facility allows a transaction to access a file owned by another region?
5. What is a mirror transaction in the context of MRO function shipping?
6. What is the Unit of Work ID (UOWID) used for in MRO?
7. Which of the following is NOT a benefit of using MRO?
8. How can you minimize performance overhead in an MRO environment?
Symptoms: Transactions fail with connection errors, regions cannot communicate
Solutions:
Symptoms: Slow transaction response times, high CPU usage for interregion communication
Solutions:
Symptoms: File access errors, resource contention, inconsistent data
Solutions:
Learn about the fundamentals of MRO, including architecture, configuration, and use cases
Understand ISC and how it differs from MRO for communicating with remote systems
Learn about DPL for calling programs across CICS regions in an MRO environment
Understand how transactions are managed and tracked across multiple regions
Learn performance optimization techniques applicable to MRO environments