Policy scopes

Policies are defined in CICS® bundles. The scope of a policy describes how it is applied.

In a platform, policies are deployed on a specific scope. The scope can be an application scope, an operation (within an application) scope, or a platform scope.

When a policy is deployed with an application scope, it applies to all user tasks within the platform that have the matching platform, application, and application version information in their application context. When a policy is deployed with an operation scope, it applies only to user tasks that also match the operation. When a policy is deployed with a platform scope, it applies to all user tasks within the platform that have the matching platform in their application context.

A policy can also be deployed without specifying a scope, in which case it is scoped to the CICS region to which the policy is deployed, and applies to all user tasks that are running in that CICS region. This method is useful in a stand-alone CICS region (SMSS) where you are not able to have a platform and applications.

Table 1. Policy scoping
Effective policy scope What the policy rules apply to How the policy is deployed
 1 No scope (rules without any scope apply to any user tasks that are running in the region). The policy rules apply to all user tasks that run in the CICS region to which you deploy the policy. The policy is deployed as a CICS BUNDLE resource defined in the CSD or CICSPlex® SM data repository, and installed into any CICS region.
 2 Platform scope. The policy rules apply only to those user tasks that have application entry points, and which are running as parts of applications that are deployed on the platform. When you define a CICS Platform project, you add to it the CICS bundles that contain policy definitions to be deployed with the platform. If you want to deploy a policy to an already active platform, export the policy bundle to the platform home directory in zFS, then use the CICS Explorer® ADDBUNDLE operation dialog to install it into a region type. For more information about the ADDBUNDLE operation dialog, see the CICS Explorer help topic "Adding a bundle to a CICS Platform".
 3 Application scope. The policy rules apply to all user tasks that run in the application (or application version) to which you deploy the policy. When you define a CICS Application project, you add to it the CICS bundles that contain policy definitions to be deployed with the application. Alternatively, you can also deploy CICS bundles with the application binding, depending on the architecture of your application.
 4 Operation scope. The policy rules apply to all user tasks that run in the operation to which you deploy the policy. First, you define the policies in a CICS bundle. You then define the scoping for the operation by editing the CICS bundle manifest with the CICS manifest editor to define an application entry point and a policy scope. Finally you add the CICS bundle to a CICS Application project for deployment. For more information, see the CICS Explorer help topics "Defining policy scopes" and "Defining application entry points".
At run time, rules at multiple scopes might apply. The output from a query against policy rules shows if multiple scopes apply. For example:
  • If you query policy rules against an application, you see all the rules that apply at scopes  1 ,  2 , and  3 .
  • If you query policy rules against an operation, you see all the rules that apply at scopes  1 ,  2 ,  3 , and  4 . A task that is running with an entry point operation gets all of the rules checked.
  • If you query policy rules against a platform, you see all the rules that apply at scopes  1  and  2 . (You would not normally get a CICS user task that is running at this level because you need an application, but this query shows you all of the rules at platform scope or 'above').
  • If you query policy rules against a region type, you see all the rules that apply at scopes  1  and  2 . That is, policies that are installed at platform scope and deployed on this region type, and policies that are installed into a CICS region included in the region type.

When CICS processes rules, it works out all of the rules that apply for a runtime scope, and combines them with the current threshold value. CICS then looks at the rules that apply in order of lowest threshold to highest threshold. For multiple rules that apply at the same threshold, CICS processes message action rules, then event action rules, then abend action rules. This method ensures that messages and events are emitted before a task is abended.