Resources and components of a CICS region

A CICS® region is a named collection of resources that are controlled by CICS as a unit. A CICS resource is any facility or component of a CICS system that is required to perform a task. The resources in a region include programs, Basic Mapping Support (BMS) map sets, transactions, terminals, files, transient data queues, temporary storage queues, and journals. A CICS region consists of the following components:

Resource definition databases
To be used by CICS, each resource requires a resource definition. Permanent resource definitions define the state of a region and its resources when it is cold started. Each machine on which a CICS region can be started has a permanent database of CICS resource definitions. Resource definitions define the attributes of CICS regions that can be started, the regions' resources, and other functions that the regions use. For example, a region definition defines the name and attributes of a CICS region. This defines, among other things, the number of application servers with which the CICS region is to be started. Each user program that the CICS region can run is identified by a program definition that is related to the region definition. The permanent resource definitions are created before the region is started. When the CICS region is cold started, the region loads the permanent resource definitions for use while it is running. These resource definitions are referred to as runtime resource definitions.

Each CICS region is defined (by a permanent region definition) with a list of resource groups with which it can be started. When the CICS region starts, resource definitions in the groups are loaded into the CICS region as runtime resource definitions. Runtime resource definitions are loaded into both an autostart database and a runtime database. These two databases are copies of each another; the difference is that the runtime database exists only when the region is running. When the region is warm started, the runtime database is loaded from the resource definitions in the autostart database. (The definitions that are in the autostart database represent the runtime definitions that the region was using when it was stopped; that is, it provides a record of the last state of the region.) The region runs from the runtime database. Runtime definitions can be operated on independently from their related permanent resource definitions. For example, you can change the runtime attributes of a transaction without affecting its permanent resource definition.

Libraries
The CICS region is implemented as several system programs, and runs user application programs, all of which exist in libraries on the machine. On Windows, these are dynamic link libraries. On UNIX and Linux, they are loadable files. The CICS programs are installed as part of the TXSeries for Multiplatforms installation procedure.
Services and subsystems
CICS regions and SFS servers are run as a special category of program. On AIX®, this category is known as a subsystem. Subsystems are managed by the System Resource Controller. On other UNIX and Linux operating systems, the concept of a subsystem does not exist as part of the operating system, and the System Resource Controller function is emulated by CICS. On Windows, the category is known as a service. Services are managed by the Windows Service Control Manager. Programs that run as services or subsystems can run concurrently.

When a CICS region is started, it begins an initialization process; when the process completes, the region is in a running state. Figure 1 shows the running state of a CICS region. The initialization process for a CICS region is summarized in Life cycle of a CICS region.

Figure 1. Windows machine with a CICS region running
Windows machine with a running
Main process
The actual function of a CICS region is controlled by a main process. The main process coordinates the parallel running of the following:
  • Application Manager: The application manager controls the creation, running, and termination of application servers. It manages a pool of application servers, and keeps the number of available application servers between a predefined minimum and maximum. It monitors a shared memory queue for transactions that are to be started and for new transactions that are waiting for an available application server. If an application server is available, the application manager runs the transaction on the application server. If no application server is available, and the maximum number has not been reached, the application manager creates a new application server to run the transaction. If the maximum number of application servers is active, the transaction is queued and retrieved automatically by the next application server to become free.
  • Listeners: The listener detects an incoming transaction request, it places the request into a shared memory queue that the application manager monitors. A CICS region can be configured to run different types of listeners; for example, those listening for local systems network architecture (SNA), TCP/IP, RPC, or named pipe requests.
  • Log Manager: The log manager writes checkpoint data to the CICS region log. The data is used to minimize restart time and to help diagnose problems.
  • Interval Control Manager: The interval control manager enables the starting of user and system transactions at user-specified times. When a time-triggered request occurs, the interval control manager adds it to the shared memory queue that the application manager monitors.
Operating system memory
A running CICS region is an area of operating system memory into which CICS system programs have been loaded (and run), with other memory allocated for the CICS region to use.
System-shared segment
A system-shared segment stores runtime resource definitions and information that needed to manage the CICS region. This data is used by many CICS region processes, so CICS synchronizes access to the data.
Shared text segment
A shared text segment contains the shared system libraries that are used by the running CICS region. User application code, if link-edited appropriately, can be located here; otherwise, it is in the process data segment.
Process data segment
A process data segment contains data that is local to an application server; for example, input and output parameters for all CICS commands that are issued by an application program that is running on the application server. The application data is private (isolated from other application programs). This makes the system more robust because an application program in error cannot accidentally damage memory that belongs to another program. Application programs that use this memory must be written so that they do not stray beyond the bounds of their own data, and changes to shared fields must be synchronized.
Task shared segment
This contains data that is to be shared among several application servers.
System log
The CICS region records in its system log all events that occur while it is running. For example, it records when a CICS client connects to the CICS region and when a user logs on. The system log (in addition to the Windows event log) can provide more clues about a problem with CICS. For example, the system log can show that a specific transaction was running, then abended for some reason. Also, each application server has its own log of events that it uses to recover its work after a failure. For more information, see Recovery during restart.
Note: On Windows systems, a CICS region runs as one Windows service for its own processing functions. It also uses other Windows services for its application servers. The CICS region consists of several internal processes that are supervised by a monitor process. The monitor process handles all the Windows service requests to start and shut down the CICS region.