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, and a policy is created in a CICS® Bundle
project. When you use the wizard to create a policy in a CICS Bundle project, you can create only one
rule; if you want to define more rules, see Adding rules to a policy in a CICS Bundle project
in the CICS Explorer product documentation. To view the final
policy XML when all the steps are complete, see Policy XML.
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 policies. The CICS Bundle project name is Policy_Bundle.
Open the CICS Cloud
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 then click Next.
In the Project Name field, enter Policy_Bundle.
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 issues a message when any 31-bit task
storage usage by a user task exceeds 0 bytes. A threshold of 0 bytes
is chosen as it is likely to cause the policy to trigger and issue
the DFHMP3001 message, making it easier to test and validate that
the deployment and scopes are as expected. The policy is named policy_31bit_storage_message,
and the policy rule is named rule_31bit_storage_message.
In the Project Explorer view, right-click the CICS Bundle project folder Policy_Bundle,
and then click New > Policy
Definition to open the Policy Definition
wizard.
In the Name field of the Policy
Information section, enter policy_31bit_storage_message.
Optional: Enter a description in the Description field
of the Policy Information section.
In the Name field of the policy
Rule Information section, enter rule_31bit_storage_message.
Optional: Enter a description in the Description field
of the Rule Information section.
From the policy rule Type list,
select Storage, and from the Item list,
select 31-bit Task storage.
To set the conditions for the policy 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
message DFHMP3001.
You have created policy policy_31bit_storage_message,
which issues message DFHMP3001 when a user task uses more than 0 bytes
of 31-bit task storage.
Create a policy that issues a message when any user task
CPU time usage exceeds 10 milliseconds. The policy is named policy_CPU_time_message,
and the policy rule is named rule_CPU_time_message.
In the Project Explorer view, right-click the CICS Bundle project folder Policy_Bundle,
and then click New > Policy
Definition to open the Policy Definition
wizard.
In the Name field of the Policy
Information section, enter policy_CPU_time_message.
Optional: Enter a description in the Description field
of the Policy Information section.
In the Name field of the policy
Rule Information section enter rule_CPU_time_message.
Optional: Enter a description in the Description field
of the Rule Information section.
To set a rule for monitoring CPU time, from the policy
rule Type list, select Time,
and from the Item list, select CPU
time.
To set the conditions for the policy rule, enter 10 in
the Value field, and select Milliseconds from
the Unit list.
Leave the action to be taken as the default value Issue
message DFHMP3001.
Tip: To emit
an event to an EP adapter when the threshold is exceeded, 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.
Clear the Open editor check box.
Click Finish to create the policy.
You have created policy policy_CPU_time_message,
which issues message DFHMP3001 when a user task uses more than 10
milliseconds of CPU time.
Results
You have created two separate policies, each containing a
rule. You can deploy the CICS bundle
with the two policy files, or you can optionally merge the rules into
one policy ready for deployment.