Use the CICS Explorer® to create your policies, so that they are ready for
deployment.
About this task
A policy is an XML definition that contains one or more policy rules.
The
policy rule describes the action that can be applied to a CICS system or user task when the
specified condition is met.
A policy is created in a CICS® Bundle project and you can define one or more policies in a CICS Bundle project.
All of the steps in this task are completed by using the CICS Explorer.
It is assumed that from the CICS Explorer you
already have a CICS Management Interface connection into the
appropriate CICSplex: DEMOPLEX.
Procedure
- Create the CICS Bundle project that will contain the first
policy. The CICS Bundle project name is
Policy_Bundle1.
- Open the Resource perspective.
- In the Project Explorer view, right-click in the window and click New >
Project to open the New Project wizard.
- Expand the CICS Resources folder, click CICS Bundle
project, and then click Next.
- In the Project Name field, enter
Policy_Bundle1.
- Accept the Bundle Properties defaults. The version number default value
is 1.0.0, and the default ID is the same as the project name.
- Click Finish to create the project in the Project Explorer.
You have created the CICS Bundle project
Policy_Bundle to contain the policies.
Create
a policy that defines a task rule
to issue a message when the 31-bit
task storage usage of any user task exceeds 0 bytes. A threshold of 0 bytes is chosen
because it is likely to cause the policy to trigger and an issued message makes it easier to test
and validate that the deployment and scopes are as expected. Message DFHMP3007 is
issued if the task is a CICS application task,
DFHMP3001 for non-application tasks. The policy is named
policy_31bit_storage_message, and the policy task rule is named
rule_31bit_storage_message. - In the Project Explorer view, open the New Project wizard in one of the following ways:
- On the main menu for the workbench, click . Then expand the CICS Resources folder, select
Policy Definition, and click Next.
- Right-click the CICS Bundle project folder
Policy_Bundle1, and then click .
- In the File Name field, enter
policy_31bit_storage_message.
- Optional: In the General Information section on the Overview tab, you can enter a
description in the Description field, a user tag in the User
Tag field, or both. This information helps you locate your policy more easily.
- Click OK. This opens the Policy editor.
- On the Overview tab, click New.
- In the dialog, enter rule_31bit_storage_message in the
Name field, and then select Storage allocation from
the Rule Type list.
- Optional: Enter a description in the Description field.
- Click OK. This opens the Rules tab.
- In the Condition section on the Rules tab, select 31-bit task
storage allocated from the Subtype list.
- To set the conditions for the task rule, enter 0 in the
Value field, and select Bytes from the
Unit list.
- Leave the action to be taken as the default value Issue a message.
- Optional: You can add a policy scope to your CICS bundle for this
policy, if you want to restrict the scope of the rules to a specific application operation.
For more information, see Policy scopes and Defining policy scopes in the CICS Explorer product documentation.
- To save the policy, click .
You have created policy policy_31bit_storage_message,
which issues either a DFHMP3001 or a DFHMP3007 message when a user
task uses more than 0 bytes of 31-bit task storage. 
- Repeat step 1 to create the CICS Bundle project that
will contain the second policy. The CICS Bundle project name
is Policy_Bundle2. Although system and task rules can be defined in the same policy, it is recommended that you
define the two types of rule in separate policies in separate CICS Bundle projects if you want to deploy a policy which defines task rules with an
application.
Create a policy that defines a system rule to issue a message when the number of user tasks in
a CICS system goes above 80% of the MXT value. The policy is named
policy_80%_of_MXT_message, and the policy system rule is named
rule_80%_of_MXT_message. - In the Project Explorer view, open the New Project wizard in one of the following ways:
- On the main menu for the workbench, click . Then expand the CICS Resources folder, select
Policy Definition, and click Next.
- Right-click the CICS Bundle project folder
Policy_Bundle, and then click .
- In the
File Name
field, enter
policy_80%_of_MXT_message.
- Optional: In the General Information section on the Overview tab, you can enter a
description in the Description field, a user tag in the User
Tag field, or both. This information helps you locate your policy more easily.
- Click OK. This opens the Policy editor.
- On the Overview tab, click New in the
right.
- In the dialog, enter rule_80%_of_MXT_message in the
Name field, and then select User tasks from the
Rule Type type list.
- Optional: Enter a description in the Description field.
- Click OK. This opens the Rules tab.
- In the Conditions section, select Goes higher than and
80% from the Percentage of MXT lists.
- Leave the action to be taken as the default value Issue a message.
Tip: To emit an event to an EP adapter when a CICS system goes above 80% of MXT, click
Emit event to, then enter the name of the EP adapter in the EP
Adapter field. Use the CICS Explorer to
create and deploy an EP adapter resource in this, or another, CICS bundle.
- To save the policy, click .
You have created policy policy_80%_of_MXT_message,
which issues either a DFHMP3009 or DFHMP3010 message when the
number of user tasks in a CICS system goes above 80% of the MXT value.
Results
You have created two separate policies in separate CICS bundles,
Policy_Bundle1 contains a policy that defines a task rule
policy_31bit_storage_message and
Policy_Bundle2
contains a policy that defines a system rule
policy_80%_of_MXT_message. You
can deploy the CICS bundles with the two policy files.