MainframeMaster

CICS Resource Management

Resource management is a fundamental aspect of CICS administration and operation. CICS resources include programs, transactions, files, terminals, and various system components that need to be properly defined, managed, and monitored for optimal system performance.

What is CICS Resource Management?

CICS resource management involves the definition, installation, monitoring, and control of all resources used by the CICS region. Resources are managed through various CICS tables and can be defined statically or dynamically.

Types of CICS Resources

1. Program Resources

Programs are executable code that runs under CICS control. They can be written in COBOL, PL/I, C, Java, or other supported languages. Program resources are defined in the Processing Program Table (PPT) and include application programs and system programs.

2. Transaction Resources

Transactions are units of work in CICS. Each transaction has a unique transaction ID (TRANSID) and is associated with a program. Transaction definitions specify priority, security requirements, and execution characteristics.

3. File Resources

File resources provide access to data stored in VSAM datasets, DB2 tables, or other data sources. Files are defined in the File Control Table (FCT) and can be shared across multiple CICS regions.

4. Terminal Resources

Terminal resources represent physical or logical devices used for communication with CICS. This includes 3270 terminals, web browsers, and other interface devices. Terminals are defined in the Terminal Control Table (TCT).

Resource Definition Methods

RDO (Resource Definition Online)

RDO is the primary method for defining CICS resources. Resources are defined in groups and lists, stored in the CICS System Definition (CSD) file. RDO provides flexibility and allows resources to be installed and discarded dynamically without CICS restart.

Static Definition

Static definitions use assembler macros to define resources in table load modules. While less flexible than RDO, static definitions are still used for certain system resources and in specific scenarios requiring predictable resource loading.

Resource Lifecycle

1. Definition

Resources are initially defined using CEDA (CICS Explorer Definition Assistant) transactions or through CICS Explorer. Definitions specify all attributes and characteristics of the resource.

2. Installation

Once defined, resources must be installed to become available for use. Installation can be done during CICS startup or dynamically while CICS is running using CEMT or EXEC CICS commands.

3. Activation

Some resources require activation before they can be used. Activation typically involves allocating system resources, establishing connections, or loading code into memory.

4. Monitoring

Active resources should be monitored for performance, availability, and proper operation. CICS provides various monitoring tools and statistics collection mechanisms.

5. Discard/Deactivation

Resources can be discarded when no longer needed, freeing up system resources. Proper deactivation ensures clean shutdown and prevents resource leaks.

Resource Management Commands

CEDA - Definition and Administration

CEDA transactions allow you to define, alter, and display resource definitions. Common CEDA commands include DEFINE, ALTER, DELETE, COPY, and DISPLAY.

CEMT - Master Terminal Commands

CEMT provides runtime control over resources. You can inquire on resource status, enable/disable resources, and perform various administrative tasks without stopping CICS.

EXEC CICS Commands

Application programs can interact with resources using EXEC CICS commands such as ENABLE, DISABLE, INQUIRE, and SET for dynamic resource management within programs.

Best Practices

1. Use Resource Groups

Organize related resources into groups for easier management. This simplifies installation, updates, and migration between environments.

2. Document Resources

Maintain thorough documentation of resource definitions, including purpose, dependencies, and special considerations. Use meaningful names and descriptions.

3. Implement Change Control

Establish procedures for resource changes, including testing in development environments before production deployment. Keep track of all modifications.

4. Monitor Resource Usage

Regularly review resource statistics to identify unused or underutilized resources. Remove obsolete definitions to keep the system clean and maintainable.

5. Plan for Capacity

Ensure adequate system resources (storage, CPU, I/O capacity) are available to support defined resources. Monitor resource consumption and plan for growth.

Common Resource Management Tasks

Adding New Resources

Use CEDA DEFINE to create new resource definitions, then use CEDA INSTALL or add to a group/list for automatic installation during CICS startup.

Modifying Existing Resources

Use CEDA ALTER to change resource attributes. Some changes require discarding and reinstalling the resource to take effect.

Removing Resources

Use CEMT to discard installed resources, then use CEDA DELETE to remove definitions from the CSD. Ensure no dependencies exist before removal.

Copying Resource Definitions

Use CEDA COPY to duplicate resource definitions, useful for creating similar resources or migrating definitions between systems.

Troubleshooting Resource Issues

Resource Not Available

Check if the resource is properly defined and installed. Use CEMT INQUIRE to verify status and attributes. Review CICS messages for installation errors.

Resource Definition Conflicts

Ensure resource names are unique and don't conflict with system resources. Check for duplicate definitions in different groups or lists.

Resource Shortage

Monitor system resources (storage, threads, file control) and adjust CICS initialization parameters if shortages occur. Consider implementing resource limits.