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

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 within the same platform.

An existing CICS Bundle project is needed to create a policy. Each policy can define one or more rules, and one or more policies can apply to an individual user 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.

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.

Procedure

  1. Select the parent folder of a CICS Bundle project from Project Explorer view.
  2. On the Eclipse menu bar, click File > New Wizards > Other to open the New Project wizard.
  3. Expand the CICS Resources folder and select Policy Definition, then click Next.
  4. Enter a name in the Name field of the Policy Information section. This name and the policy extension are the policy file name.
  5. Optional: Click Back to navigate to the previous page.
    1. Enter a parent folder name or select a parent folder project from the list of CICS Bundle projects.
    2. Modify a file name for the policy in the File name field.
    3. Click Next.
  6. Optional: Enter a description in the Description field of the Policy Information section.
  7. Enter a name for the policies first rule in the Name field.
  8. Optional: Enter a description in the Description field of the Rule Information section.
  9. Select Type from the list.
  10. Set the conditions for the policy rule, select Item, enter the unsigned integer value in the Value field, and select Unit.
  11. Select the action to be taken when the condition of the rule is exceeded.
  12. Clear Open editor.
  13. Click Finish to create the policy.

Results

The CICS Bundle project that contains a policy is created.

What to do next

  • Add the CICS bundle that contains the policy to a platform, application, or application binding project to package it for deployment.
Or:
  • Add the CICS bundle that contains the policy to an installed platform, by using the ADDBUNDLE operation dialog. For more information, see Adding a bundle to a CICS Platform.
Or:
  • 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 which 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.
You can add additional rules to a policy with a text editor. For more information, see Adding rules to a policy in a CICS Bundle project.