Skip to content

Commit 502be83

Browse files
authored
Merge pull request #272 from markcocker/dev
Add CICS policy tutorial.
2 parents 83160a3 + 054b778 commit 502be83

File tree

5 files changed

+78
-6
lines changed

5 files changed

+78
-6
lines changed

docs/_data/sidebars/cdp_sidebar.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ entries:
2323
output: web
2424

2525
- title: Tutorials
26-
url: cdp-Deploying-your-first-nodejs-app.html
26+
url: cdp-Preparing-a-zOS-PT-image.html
2727
output: web
2828
folderitems:
2929
- title: Preparing a z/OS PT image
@@ -35,6 +35,9 @@ entries:
3535
- title: Deploying your first Node.js app
3636
url: cdp-Deploying-your-first-nodejs-app.html
3737
output: web
38+
- title: Deploying a CICS policy
39+
url: cdp-Deploying-a-CICS-policy.html
40+
output: web
3841
- title: Deploying using individual actions
3942
url: cdp-Deploying-using-individual-actions.html
4043
output: web
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Deploying a CICS policy
3+
tags: [tutorial]
4+
keywords:
5+
summary: "The following steps take you through deploying a sample CICS bundle containing a policy."
6+
sidebar: cdp_sidebar
7+
permalink: cdp-Deploying-a-CICS-policy.html
8+
folder: cdp
9+
toc: true
10+
---
11+
12+
[CICS policies](https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.5.0/fundamentals/policies/policies.html) are used to monitor the state of the CICS region, and the resources and workload in it. A policy consists of rules that define the conditions that are required to be met for the rule to trigger, and the action to take when the conditions are met.
13+
14+
This tutorial shows how to download a sample CICS policy and deploy it using the CICS deploy plug-in. The policy rule condition is when the number of active tasks in your CICS regions goes above 90% of your MXT value, and action is to issue message DFHMP3009 to the CICS region JES job log. CICS policies and this sample are described in article [Using CICS policy system rules to monitor system health](https://developer.ibm.com/cics/2017/07/04/using-cics-policy-system-rules-monitor-system-health/).
15+
16+
### Procedure
17+
18+
1. Install the Zowe CLI and plug-ins by following the steps in [Installing](cdp-Installing).
19+
20+
2. Create Zowe CLI profiles by following the steps in [Creating Zowe CLI profiles](cdp-Creating-Zowe-CLI-profiles).
21+
22+
3. Clone the [cics-policy-samples](https://github.ibm.com/CICS/cics-policy-samples/tree/master) repository.
23+
24+
```text
25+
git clone https://github.ibm.com/CICS/cics-policy-samples.git
26+
27+
cd cics-policy-samples/bundles/CICSDEV_system_rule
28+
```
29+
30+
4. Deploy the CICS bundle into CICS.
31+
32+
```text
33+
zowe cics-deploy push bundle --name Policy --overwrite
34+
```
35+
36+
A progress bar is shown with status messages as the CICS bundle is deployed. This can take a few minutes. The command will summarize the deployment, for example:
37+
38+
<pre class="messageText">
39+
WARNING: No .zosAttributes file found in the bundle directory, default values will be applied.
40+
Regions in scope 'CICPY000' of CICSplex 'ZOSPTINT':
41+
Applid: CICPY000 jobname: CICPY000 jobid: STC47025 sysname: MV2C
42+
PUSH operation completed</pre>
43+
44+
The warning can be ignored as the default values result in the files being uploaded in text that is suitable for this bundle.
45+
46+
The CICS BUNDLE resource named `Policy` is defined, installed, and enabled in CICS. If the BUNDLE `Policy` was already defined or installed in CICS, it is undeployed first. As the BUNDLE is enabled, the policy is also enabled. If there are errors, retry with the `--verbose` option for more detailed output, or refer to [Troubleshooting](cdp-Troubleshooting-General).
47+
48+
### Results
49+
50+
The CICS policy is enabled in the CICS region. When the policy rule is triggered, CICS will write message DFHMP3009 to the CICS region JES job log. For details on how to view this log see [Log and trace files](cdp-Troubleshooting-General).
51+
52+
To get started with defining your own CICS policy:
53+
* [Download and start the CICS Explorer](https://www.ibm.com/support/knowledgecenter/en/SSSQ3W_5.5.0/com.ibm.cics.core.help/topics/concepts/install_planning_client.html).
54+
* Create a CICS bundle project using the procedure [Creating a CICS bundle project](https://www.ibm.com/support/knowledgecenter/SSSQ3W_5.5.0/com.ibm.cics.core.help/topics/tasks/create_bundle.html).
55+
* Create a policy using the procedure [To create a policy in a CICS bundle project](https://www.ibm.com/support/knowledgecenter/SSSQ3W_5.5.0/com.ibm.cics.core.help/topics/tasks/task_create_policy.html).

docs/pages/cdp/cdp-Installing.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ toc: false
3636
npm run build
3737
zowe plugins install .
3838
```
39-
4. Install the cics plugin:
39+
40+
4. Install the cics plugin:
4041

4142
```console
4243
zowe plugins install @brightside/cics
@@ -46,4 +47,17 @@ toc: false
4647

4748
```console
4849
zowe plugins list
49-
```
50+
```
51+
52+
Displays a list of the installed plug-ins:
53+
54+
<pre class="messageText">
55+
-- pluginName: zowe-cli-cics-deploy-plugin
56+
-- package: zowe-cli-cics-deploy-plugin
57+
-- version: 0.5.0
58+
-- registry: https://eu.artifactory.swg-devops.com/artifactory/api/npm/cicsts-npm-virtual
59+
60+
-- pluginName: @zowe/cics
61+
-- package: @zowe/cics
62+
-- version: 2.0.1
63+
-- registry: https://eu.artifactory.swg-devops.com/artifactory/api/npm/cicsts-npm-virtual</pre>

docs/pages/cdp/cdp-Preparing-a-zOS-PT-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Preparing a z/OS PT image
2+
title: Preparing a z/OS Provisioning Toolkit image
33
tags: [tutorial]
44
keywords:
55
summary: "The following steps take you through preparing a z/OS Provisioning Toolkit image for CICS, and optionally including an application in the image."

docs/pages/cdp/cdp-Provisioning-a-CICS-region.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ Before you can provision a CICS region, a z/OS PT image needs to be created and
8080

8181
7. Update your Zowe CLI cics-deploy profile to deploy to your CICS region by default.
8282

83-
Update `--scope` to specify the value from DFH_REGION_APPLID, and `--bundle-directory` to specify the `bundles` subdirectory of DFH_REGION_ZFS_DIRECTORY. For example:
83+
Update `--scope` to specify the value from DFH_REGION_APPLID, and `--target-directory` to specify the `bundles` subdirectory of DFH_REGION_ZFS_DIRECTORY. For example:
8484

8585
```console
86-
zowe profiles update cics-deploy cics --scope CICPY000 --bundle-directory "/u/cicprov/mnt/CICPY000/bundles"
86+
zowe profiles update cics-deploy cics --scope CICPY000 --target-directory "/u/cicprov/mnt/CICPY000/bundles"
8787
```
8888

8989
#### Results

0 commit comments

Comments
 (0)