When you provision a CICS region, you can now include a CICS® bundle in your z/OS Provisioning Toolkit (z/OS PT) image. CICS bundles can contain policies, OSGi, or Liberty Java™ application code and other resource definitions, including LIBRARYs for local applications. The inclusion of a CICS bundle means that you are able to provision a CICS region with a specific configuration, or with specific applications already available. See Include a CICS bundle in your image for more details about this feature.

The following is a simple scenario that includes two application bundles (both are CICS samples) in an image and then provisions the CICS container using z/OS PT.

Step 1 Create the CICS bundles using the IBM Explorer for z/OS

For this example we are using the CICS Hello World example (a war bundle) and the CICS TSQ example (an EBA Bundle) but you can include any bundle resources that you choose.
To download IBM Explorer for z/OS, click here.
Open IBM Explorer for z/OS, choose Resource Perspective, and then:
Click New->Example…->CICS Examples->Servlet and Jsp->CICS Hello World and click Finish
Click New->Example…->CICS Examples->Servlet and Jsp->CICS Temprorary Storage Queue and click Finish

You should now have created the following bundles:
com.ibm.cics.server.examples.hello.bundle
com.ibm.cics.server.examples.tsq.bundle

Step 2 Export the CICS bundles to your user directory

Select the bundle projects one by one and click Export Bundle Project to z/OS UNIX FILE System…


Note the directory needs to be changed to your own directory

Step 3 Edit the zosptfile

You could create a empty zosptfile under the directory where you export the bundle to, and then edit it from z/OS Unix Files view in z/OS perspective,as follow:

We use the COPY command in the zosptfile, to copy each of the bundle resources.In this scenario,this is how the zosptfile looks:

FROM cics_54_liberty
COPY com.ibm.cics.server.examples.wlp.tsq.bundle_1.0.1 bundles/com.ibm.cics.server.examples.wlp.tsq.bundle_1.0.1
COPY com.ibm.cics.server.examples.wlp.hello.bundle_1.0.1 bundles/com.ibm.cics.server.examples.wlp.hello.bundle_1.0.1

Note:We use z/OS PT provided sample image cics_54_liberty as the base image, and add bundles on top of that. Also we include the DFH_REGION_JVMSERVER environment property in this zosptfile(in the base image cics_54_liberty), as the two liberty applications require a Liberty JVM server,this will enable z/OS PT to create liberty JVM server named as DFHWLP, which will be referenced in the sample liberty application.If you include an OSGI bundle, you could change the value of the environment variable “DFH_REGION_JVMSERVER” from “Liberty” to “OSGi”. Make sure the JVM server name you provide in the application definition is the same as the one created by z/OS PT, which will be named as DFHOSGI.
For more details, please refer to Include a CICS bundle in your image
Alternatively, you could create your own JVMSERVER in the bundle resources and include it in your image.

Step 4 Build the image with z/OS PT

Issue the zospt build command to build the image using the zosptfile you created:
zospt build -t <your image name> <your zosptfile location>
Here is some example output from the zospt build command:

Step 5 Run the image by using z/OS PT

Issue the zospt run command to run the image with an existing CICS template (created previously by using the z/OSMF server)
zospt run <your image name>
see the sample log:

Step 6 Get the port information from the run result

The https port is available from the zospt run output (DFH_REGION_HTTPS : 28492). You need this to….

Step 7 Verify the liberty application using the URL:https://<IP>:<port>/<applicationName>

Enter the below link in your browser:
https://<Host Name>:<Https port>/com.ibm.cics.server.examples.wlp.hello/
You should see this output:

Similarly, use this link to verify the TSQ application:
https://<Host Name>:<Https port>/com.ibm.cics.server.examples.wlp.tsq/, you will should see::

We hope this article has helped you to understand how to include bundle rsources in your z/OS PT CICS image.

Join The Discussion

Your email address will not be published. Required fields are marked *