Creating a policy in a CICS Bundle project

A policy is an XML definition that contains one or more policy rules. The policy rules describe the controls or actions that can be applied to one or more tasks. A policy is created in a CICS® Bundle project and you can define one or more policies in a CICS Bundle project. By packaging your policies in this way, you can deploy your policies as a single entity to CICS, making it easier to update and manage the policies in CICS.

About this task

A policy monitors and controls user tasks. The policy rules define a rule type that sets limits which, if exceeded, result in the CICS region where the task is running taking automatic action. Each policy can define one or more rules, and one or more policies can apply to an individual user task. To create a policy, you require an existing CICS Bundle project.

Policies that are deployed at the platform level apply to all applications that are deployed on that platform. Policies that are deployed at the application level apply only to that application and not to others that might run in the same platform.

At run time, CICS determines all of the rules that apply to a user task. As the task executes, CICS applies the rules in order of lowest threshold to highest threshold. Where multiple rules apply at the same threshold, CICS applies message type rules first, then event rules, and finally abend rules. This sequence ensures that messages and events are emitted before a task is abended.

When you use the wizard to create a policy in a CICS Bundle project, you can create only one rule. To add more rules to an existing policy, you can use the wizard to create another policy and copy the additional rule to the existing policy file.

Procedure

  1. Select the parent folder of a CICS Bundle project from Project Explorer view.
  2. On the main menu for the workbench, click File > New > Other to open the New Project wizard.
  3. Expand the CICS Resources folder, select Policy Definition, then click Next.
  4. In the Policy Information section, enter a name in the Name field, and optionally, a description in the Description field. This name provides the policy file name, for example name.policy.
  5. In the Rule Information section, enter a name for the first policy rule in the Name field, and optionally, a description in the Description field.
  6. Set the condition that triggers the rule:
    1. Select the required policy rule type from the Type list.
    2. Select the required item from the Item list.
    3. Enter the unsigned integer value in the Value field, and click the required Unit.
    When you select the policy rule type and item for a policy condition, the CICS release that supports the required policy schema version is displayed. For more information about policy rule types and policy thresholds, see the relevant links.
  7. Select the action to take when the condition of the rule is exceeded from the following options:
    • Issue a message
    • Emit event to. Select EP Adapter or EP Adapter Set, then enter the name of the required EP adapter or EP adapter set.
    • Abend task with abend code AMPB
    For more information about policy actions, see the relevant link.
  8. Clear Open editor.
  9. Click Finish to create the policy.

Results

A policy is created in the CICS Bundle project.

What to do next

Optionally, add more rules to the policy. See Adding rules to a policy in a CICS Bundle project.

When your policy is complete, deploy it in one of the following ways:
  • Add the CICS bundle that contains the policy to a platform, application, or application binding project to package it for deployment.
  • Add the CICS bundle that contains the policy to an installed platform, by using the ADDBUNDLE operation dialog. See Adding a CICS bundle to a platform.
  • Export the CICS Bundle project to zFS for deployment, and then define, install, and enable a CICS BUNDLE resource for the CICS Bundle project. Set the BASESCOPE attribute for the BUNDLE resource in one of the following ways:
    • To deploy a policy so that it applies to user tasks that have application entry points, and that are running as parts of applications that are deployed to a specific platform, set the BASESCOPE attribute to cicsapplication://platform_name////.
    • To deploy a policy so that it applies to all user tasks associated with a specific CICS application that is running in a specific platform, set the BASESCOPE attribute to cicsapplication://platform_name/application_name/application_major_version/application_minor_version/application_micro_version.
    • To deploy a policy so that it applies to all user tasks in the CICS region, leave the BASESCOPE attribute blank.
    Note: If you use this method of deployment, you must deploy the CICS Bundle project to each z/OS® system where you want it to apply. For example, if you want your policy to apply all user tasks that are associated with a specific CICS application that is running in a specific platform, you must deploy the CICS Bundle project to each z/OS system within the platform on which the application runs, and with the BASESCOPE set to cicsapplication://platform_name/application_name/application_major_version/application_minor_version/application_micro_version.