Creating policies

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. Start of changeThe policy rule describes the action that can be applied to a CICS system or user task when the specified condition is met.End of change 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

  1. Create the CICS Bundle project that will contain the first policy. The CICS Bundle project name is Policy_Bundle1.
    1. Open the Resource perspective.
    2. In the Project Explorer view, right-click in the window and click New > Project to open the New Project wizard.
    3. Expand the CICS Resources folder, click CICS Bundle project, and then click Next.
    4. In the Project Name field, enter Policy_Bundle1.
    5. 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.
    6. Click Finish to create the project in the Project Explorer.
    You have created the CICS Bundle project Policy_Bundle to contain the policies.
  2. Start of changeCreate Start of changea policy that defines a task ruleEnd of change 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.
    1. In the Project Explorer view, open the New Project wizard in one of the following ways:
      • On the main menu for the workbench, click File > New > Other. Then expand the CICS Resources folder, select Policy Definition, and click Next.
      • Right-click the CICS Bundle project folder Policy_Bundle1, and then click New > Policy Definition.
    1. In the File Name field, enter policy_31bit_storage_message.
    2. 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.
    3. Click OK. This opens the Policy editor.
    1. On the Overview tab, click New.
    2. In the dialog, enter rule_31bit_storage_message in the Name field, and then select Storage allocation from the Rule Type list.
    3. Optional: Enter a description in the Description field.
    4. Click OK. This opens the Rules tab.
    5. In the Condition section on the Rules tab, select 31-bit task storage allocated from the Subtype list.
    6. To set the conditions for the task rule, enter 0 in the Value field, and select Bytes from the Unit list.
    7. Leave the action to be taken as the default value Issue a message.
    8. 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.
    9. To save the policy, click File > Save.
    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. End of change
  3. 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.
  4. Start of changeCreate 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.
    1. In the Project Explorer view, open the New Project wizard in one of the following ways:
      • On the main menu for the workbench, click File > New > Other. Then expand the CICS Resources folder, select Policy Definition, and click Next.
      • Right-click the CICS Bundle project folder Policy_Bundle, and then click New > Policy Definition.
    2. In the Start of changeFile NameEnd of change field, enter policy_80%_of_MXT_message.
    3. 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.
    4. Click OK. This opens the Policy editor.
    5. On the Overview tab, click New in the right.
    6. In the dialog, enter rule_80%_of_MXT_message in the Name field, and then select User tasks from the Rule Type type list.
    7. Optional: Enter a description in the Description field.
    8. Click OK. This opens the Rules tab.
    9. In the Conditions section, select Goes higher than and 80% from the Percentage of MXT lists.
    10. 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.
    11. To save the policy, click File > Save.
    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.End of change

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.


creating_and_editing_policies.html | Timestamp icon Last updated: Sunday, 4 June 2017