CICS policies are used to monitor the state of the CICS region, and the resources and workload in it. A policy consists of rules that define the conditions that are required to be met for the rule to trigger, and the action to take when the conditions are met.
This tutorial shows how to download a sample CICS policy and deploy it using the CICS deploy plug-in. The policy rule condition is when the number of active tasks in your CICS regions goes above 90% of your MXT value, and action is to issue message DFHMP3009 to the CICS region JES job log. CICS policies and this sample are described in article Using CICS policy system rules to monitor system health.
Procedure
-
Install the Zowe CLI and plug-ins by following the steps in Installing.
-
Create Zowe CLI profiles by following the steps in Creating Zowe CLI profiles.
-
Clone the cics-policy-samples repository from GitHub.
git clone https://github.com/cicsdev/cics-policy-samples.git cd cics-policy-samples/bundles/CICSDEV_system_rule
-
Deploy the CICS bundle into CICS.
zowe cics-deploy push bundle --name Policy --overwrite
A progress bar is shown with status messages as the CICS bundle is deployed. This can take a few minutes. The command will summarize the deployment, for example:
The warning can be ignored as the default values result in the files being uploaded in text that is suitable for this bundle.
The CICS BUNDLE resource named
Policy
is defined, installed, and enabled in CICS. If the BUNDLEPolicy
was already defined or installed in CICS, it is undeployed first. As the BUNDLE is enabled, the policy is also enabled. If there are errors, retry with the--verbose
option for more detailed output, or refer to Troubleshooting.
Results
The CICS policy is enabled in the CICS region. When the policy rule is triggered, CICS will write message DFHMP3009 to the CICS region JES job log. For details on how to view this log see Log and trace files.
To get started with defining your own CICS policy:
- Download and start the CICS Explorer.
- Create a CICS bundle project using the procedure Creating a CICS bundle project.
- Create a policy using the procedure To create a policy in a CICS bundle project.