Restricting a policy to specific user tasks in a stand-alone CICS region

When a policy is deployed into a stand-alone CICS® region, by default task rules that are defined in the policy apply to all CICS user tasks that are running in that CICS region. By defining an application entry point and a policy scope, you can restrict the effect of policy task rules to only user tasks with a specific CICS TRANSACTION ID.

Before you begin

You must have a CICS bundle project in the Project Explorer view.

About this task

This task shows how by using a combination of a TRANSACTION application entry point and a policy scope it is possible to restrict the task rules defined by a policy to specific user tasks executing in a stand-alone CICS region. It is also possible to restrict policy to specific user tasks using both PROGRAM and URIMAP application entry points. For more information about the different types of application entry point, see Application entry points.

A policy scope applies to an application operation that is specified in the application entry point definition. Each policy scope names the policy resource and an operation. The policy resource is not required to be declared in the same CICS bundle project. For more information about application entry points, see Defining application entry points. For more information about policy scopes, see Policy scopes.

Procedure

  1. Expand the CICS bundle project and the META-INF folder.
  2. Open the cics.xml file with the CICS Bundle Manifest Editor to view the bundle manifest.
  3. Click the Entry Points tab to open the list of application entry points for the bundle.
  4. Click Add to define an entry point:
    1. Enter the name of the application operation. The operation name is case sensitive. It can include the characters a-z, A-Z, 0-9._#@-, and has a maximum length of 64 characters.
    2. Select TRANSACTION from the list of the resource types.
    3. Enter the name of the CICS TRANSACTION resource.
    4. Click OK to add the entry point definition to the bundle manifest.
  5. Click the Policy Scopes tab to show the list of policy scopes for the bundle.
  6. Click Add to define a new policy scope:
    1. Enter the name of the application operation as entered in Step 4.a.
    2. Enter the name of the policy resource. The policy must be defined in a CICS bundle project that is deployed with the CICS bundle project that defines the policy scope; it does not need to be in the same CICS bundle project.
    3. Click OK to add the policy scope definition to the bundle manifest.
  7. Click File > Save or press Ctrl+S (cmd+S for OS X) to save the changes to the bundle manifest.

Results

An application entry point and policy scope have been created. Together they restrict the task rules that are defined in a policy to only CICS user tasks with a specific CICS TRANSACTION ID.

What to do next

  1. Export the bundle project to the target directory on z/OS® UNIX. See Deploying a CICS bundle.
  2. Define, install and enable a BUNDLE resource for the CICS bundle. You can use CICS Explorer to create and install a definition for the BUNDLE by opening the Bundle Definitions view. From the main menu of the CICS Explorer workbench, click Definitions > Bundle Definitions.
  3. After the BUNDLE resource is installed and enabled, the bundle must be set available to activate the application entry points. You can use CICS Explorer to check the enable status and make the bundle AVAILABLE by opening the Bundles operational view. From the main menu of the CICS Explorer workbench, click Operations > Bundles.

The task rules defined in the policy are now active and apply to only those CICS user tasks with the specific CICS TRANSACTION ID.