Skip to content

Commit 231cd21

Browse files
committed
Add zosptfile for automated deployment
- Update the README to describe how to use z/OS PT - Add the built war file - Change the default jvmserver name in the warbundle file to match what z/OS PT ships with - add a zosptfile
1 parent fca4214 commit 231cd21

File tree

4 files changed

+51
-4
lines changed

4 files changed

+51
-4
lines changed

web-banking/README.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ This fictional example is based on real life situations, showcasing
2525
how the CICS asynchronous API in CICS TS V5.4 can provide robust,
2626
responsive applications.
2727

28+
2829
## Set Up
2930

31+
3032
### COBOL Programs and their Resource Definitions
3133
The source code in folder web-banking-homepage tracks the changes made
32-
as the Rebooks publication progresses. Use the tags to identify the
34+
as the Redbooks publication progresses. Use the tags to identify the
3335
level of the application at a particular point in the examples
3436
history.
3537

@@ -66,7 +68,7 @@ DEFINE TRANSACTION(GETL) GROUP(ASYNCAPI) PROGRAM(GETLOAN)
6668
```
6769

6870
Note that the step-by-step instructions in the CICS Asynchronous API
69-
Rebooks publication will prompt to add transactions `PTNR`, `GETN`,
71+
Redbooks publication will prompt to add transactions `PTNR`, `GETN`,
7072
`ACUR`, and `GETL`.
7173

7274
A CICS Bundle project, `AsyncRedbooksWebBankingBundle`, is provided in
@@ -81,6 +83,7 @@ To use `AsyncRedbooksWebBankingBundle`:
8183
3. Export the bundle to zFS and define and install it in your CICS
8284
region.
8385

86+
8487
### Java Web Frontend Application
8588
Two Eclipse projects are provided in the [`etc`](etc/) directory:
8689

@@ -90,7 +93,7 @@ Two Eclipse projects are provided in the [`etc`](etc/) directory:
9093
The first is the dynamic web project that is explained in Chapter 6 of
9194
the Redbooks publication. The second project is a CICS Bundle to be
9295
able to deploy the dynamic web project to Liberty in CICS. The assumed
93-
name of the `JVMSERVER` resource is `WLPJVM`. This should be changed
96+
name of the `JVMSERVER` resource is `DFHWLP`. This should be changed
9497
to match the name of your Liberty `JVMSERVER` resource, by editing
9598
[`AccountServices.warbundle`](etc/AccountServicesBundle/AccountServices.warbundle)
9699
in `AccountServicesBundle`.
@@ -100,8 +103,10 @@ Liberty's `messages.log` will print the URL of the web
100103
application. Use a web browser to visit the page and drive the
101104
business logic.
102105

106+
103107
## Running the Example
104108

109+
105110
### Using a CICS Terminal
106111
At the CICS terminal screen, enter the transaction WEBH, followed by a
107112
four-digit customer number, such as 0001.
@@ -112,5 +117,44 @@ For example:
112117
WEBH 0001
113118
```
114119

120+
121+
## Using z/OS Provisioning Toolkit
122+
If you have [z/OS Provisioning Toolkit][zospt] set up at your
123+
workplace, you can use the [`zosptfile`](etc/zosptfile) we've included
124+
to automate the provisioning of a CICS region with the resource
125+
definitions and Java components installed. To use this:
126+
127+
1. Download the [zip file of this repository][zip]
128+
2. Copy it across to the zFS partition on your LPAR (ensuring it's
129+
copied in binary format)
130+
3. From a shell when connected to USS on the LPAR, extract the zip
131+
file, e.g., ```jar xf cics-async-api-redbooks-master.zip```
132+
4. Edit the library resource in the CICS Bundle,
133+
[`AsyncRedbooksWebBankingBundle/ASYNCLIB.library`][asynclib], to
134+
change its `dsname01` property to point to your dataset with the
135+
compiled COBOL modules
136+
5. Edit the
137+
[`AccountServicesBundle/AccountServices.warbundle`][warbundle]'s
138+
jvmserver property, if you've edited the default of `DFHWLP` that
139+
z/OS PT provides in its template
140+
4. Build the image:
141+
```zospt build -t cics_async_redbooks cics-async-api-redbooks-master/web-banking/etc/```
142+
5. Run the image:
143+
```zospt run cics_async_redbooks```
144+
6. After the CICS region starts successfully, use a web browser to
145+
connect to
146+
```http://[hostname]:[port]/AccountServices```
147+
specific to your LPAR's hostname, and the port number assigned to
148+
your CICS region by z/OS PT.
149+
150+
115151
## License
116152
This project is licensed under [Apache License Version 2.0](../LICENSE).
153+
154+
155+
156+
157+
[zospt]: https://developer.ibm.com/mainframe/products/zospt/
158+
[zip]: https://github.com/cicsdev/cics-async-api-redbooks/archive/master.zip
159+
[asynclib]: etc/AsyncRedbooksWebBankingBundle/ASYNCLIB.library
160+
[warbundle]: etc/AccountServicesBundle/AccountServices.warbundle
8.63 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<warbundle symbolicname="AccountServices" jvmserver="WLPJVM"/>
2+
<warbundle symbolicname="AccountServices" jvmserver="DFHWLP"/>

web-banking/etc/zosptfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM cics_54_liberty
2+
COPY AccountServicesBundle bundles/AccountServicesBundle
3+
COPY AsyncRedbooksWebBankingBundle bundles/AsyncRedbooksWebBankingBundle

0 commit comments

Comments
 (0)