The IBM z/OS Provisioning Toolkit (zospt) V1.0 is a simple USS utility that you can use with the IBM z/OSMF sample workflows for IBM MQ (shipped with IBM MQ V9.0.1 for z/OS), to dynamically provision a development IBM MQ for z/OS queue manager.

Note: In the sample IBM z/OSMF workflows for IBM MQ, the qmgrActions.xml file defines the list of actions that you can perform against a provisioned IBM MQ for z/OS queue manager. The action to start an IBM MQ queue manager is currently called startQMgr and the action to stop an IBM MQ queue manager is called stopQMgr. zospt requires that the actions be called simply start and stop. So, before you can start or stop an image (see below), you need to change the action names in the actionList from startQMgr and stopQMgr to start and stop, respectively.

This article gives you a step by step guide of how to provision an IBM MQ for z/OS queue manager for use in a development environment.

Downloading the toolkit

The toolkit is provided as a zip file that contains a .pax file which you need to be upload and unpax into to a USS directory on the target z/OS system. You can download the toolkit from: download zospt toolkit.

Installing the toolkit

The readme file provided in the toolkit zip file lists the steps you need to perform to install the toolkit. The toolkit is by default installed in a subfolder called zospt e.g. I installed it in USS directory /u/mayur:

zospt_dir

Note: For the purposes of this article, the toolkit is installed on host ‘my.host.com‘. You will of course install it on your suitable host.

Initial configuration

Before your start to create an IBM MQ image, you need to set up the IBM z/OSMF server connection properties in the zosmf.properties file in the zospt/config directory. The zosmf.properties file is in UTF-8 encoding so you need to use a suitable editor when updating this file.

Note: I actually entered ISPF option 3.17 and used the eu (edit UTF-8) option to edit and save the file in encoding UTF-8:

zosptConfig

zospt will use these properties to establish a connection with the IBM z/OSMF server when required. For example, when running an IBM MQ image to create an IBM MQ for z/OS queue manager.

Creating an IBM MQ image

Create a directory for the IBM MQ image in the zospt/samples directory (e.g. mq_v9):

mq_v9_dir

Change to this new directory and create a file called zosptfile in encoding UTF-8. Use your favorite editor to enter the following text into the file:

zosptfile2

FROM scratch defines the image on which this image is based. A value of FROM scratch, will make the image you are creating the base image.

Set environment variable ZOSMF_TEMPLATE to the name of a IBM z/OSMF template that you previously created and published, and which you want to use to provision an IBM MQ for z/OS queue manager (e.g. PrvMQ).

Note: I actually entered ISPF option 3.17 and used the eu (edit UTF-8) option to create, edit and save the file in encoding UTF-8:

zosptfile4

zosptfile3

but, you can use whichever editor you feel comfortable with.

Check that the file creation was successful:

zosptfile1

Building an IBM MQ image

From within the directory that contains the zosptfile, issue zospt build to build the IBM MQ image. The -t option allows you to tag a name to the image (e.g. mq) and the period (.) specifies the path to the directory that contains the zosptfile (e.g. the current directory):

build

You can see the image (e.g. mq.tar) in the images directory:

images1

You can also list images by issuing zospt images:

images2

Setting optional environment variables

By default, zospt uses the default IBM z/OSMF domain and tenant. Depending on the domain and tenant you associated the published IBM z/OSMF template (e.g. PrvMQ) with, you may need to set the following environment variables:

envvars

Running an IBM MQ image (i.e. provision an IBM MQ for z/OS queue manager)

Issue zospt run and specify the name of the image you want to run (e.g. mq). The workflows associated with the IBM z/OSMF template perform the required steps to create an IBM MQ for z/OS queue manager:

runmq

Once you have created the IBM MQ for z/OS queue manager, the Queue Manager name/SSID (z/OS Subsystem Identifier) and number of the TCP/IP port provisioned for inbound connections are displayed (e.g. ZC05 and 25005, respectively). The name of the container and the container id, which need to be specified on some commands (see below), are also displayed.

Adding the IBM MQ for z/OS queue manager to the IBM MQ Explorer

You can then use the host name, queue manager name and TCP/IP port number to establish a connection to the queue manager. For example, you can establish a connection to it using Add Remote Queue Manager… in the IBM MQ Explorer:

explorer1

explorer2

Defining a local queue on the IBM MQ for z/OS queue manager

You can now administer the queue manager from the IBM MQ Explorer. For example, you could define a local queue called TEST.QUEUE:

explorer5

explorer4

Defining MQSERVER to allow client connections to the IBM MQ for z/OS queue manager

You can define the MQSERVER variable so that you can run client applications to access IBM MQ resources on the IBM MQ for z/OS queue manager:

mqserver

Note: The IBM MQ for z/OS queue manager is by default created with Channel Authentication enabled (i.e. CHLAUTH(ENABLED)). Therefore, before clients can connect to the IBM MQ for z/OS queue manager, you need to either define Channel Authentication rules (refer to the IBM MQ V9.0.1 Knowledge Center for further details) or disable Channel Authentication from the IBM MQ Explorer (or, if you are familiar with this, you could alter the IBM MQ for z/OS queue manager attributes and set CHLAUTH(DISABLED)):

explorer6

Running client applications against the IBM MQ for z/OS queue manager

Once you have set up Channel Authentication, you can run sample program amqsputc to put a message on local queue TEST.QUEUE (created above), for example:

amqsputc

Displaying running containers

You can issue zospt ps to display running containers:

displaycontainers

Starting an IBM MQ image (i.e. starting an IBM MQ for z/OS queue manager)

The sample IBM z/OSMF workflow to provision an IBM MQ for z/OS queue manager also starts the queue manager but, if required, you can start an image by issuing zospt start and specifying the container name or container id of the image you want to start.

start

Stopping an IBM MQ image (i.e. stopping an IBM MQ for z/OS queue manager)

Issue zospt stop and specify the container name or container id of the image you want to stop.

stop

Removing an IBM MQ image (i.e. deprovision an IBM MQ for z/OS queue manager)

Issue zospt rm with the force flag (-f) and specify the container name or container id of the image you want to remove:

remove

Summary

This article shows you how to use the z/OS Provisioning Toolkit to provision a development IBM MQ for z/OS queue manager and how to then connect to the queue manager and make use of the resources on the queue manager.

For more information about the IBM z/OS Provisioning Toolkit, see: IBM z/OS Provisioning Toolkit

For more information about using IBM z/OSMF to provision IBM MQ resources, see: Using_z_OSMF_V2_2_Cloud_Provisioning_to_stand_up_MQ_resources and Using IBM z/OSMF to automate IBM MQ

5 comments on"Provisioning an IBM MQ development environment with the IBM z/OS Provisioning Toolkit"

  1. […] Provisioning an IBM MQ development environment with the IBM z/OS Provisioning Toolkit […]

  2. Hi Mayur,

    Can the MQ self provisioning be achieved for MQ v8 as well or is it only for MQ v9 and above.

    If not, can it be achieved by writing some additional piece of code in z/OSMF.

    Thanks
    Prahsant

    • Mayur Raja March 27, 2018

      Hi Prashant,

      So, the sample workflows and JCL files that we ship for provisioning are licensed material and are only shipped with MQ V9. And we recommend that you use the latest versions of the workflows that are shipped with MQ for z/OS V9.0.5 (CD Release). Assuming that you have a license to use MQ V9, you can run either MQ LTS or MQ CD so you should have access to the latest workflows. Now, assuming that you also have a license for MQ V8, you can use the workflows to provision a V9 or a V8 Queue Manager. The thing you need to do is to ensure that you set the correct properties in the workflow_variables.properties file. In particular, ensure that you set variable CSQ_TARG_LIB_HLQ to the high level qualifier of your V8 MQ Load Libraries.

      Also note that we only supply samples so you are at liberty to make further changes to the samples if required.

      Regards .. Mayur

      • Thanks Mayur,

        So this means – to provision MQ v8 queue manager, I need to have MQ v9 code available on my system.Please confirm.

        Is there any other way to accomplish this(I know urban code still does not have this option to provision MQ on z/OS-it just has MQSC plugin).

        Thanks
        Prashant

        • Mayur Raja March 27, 2018

          Hi Prashant,

          Yes, unfortunately that is currently the case. You would need to get a copy of the MQ V9 code so that you can then access the workflows to provision an MQ V8 Queue Manager.

          You are right, the MQSC UCD plugin only deals with provisioning MQ queues. It does not handle provisioning of MQ Queue Managers. However, UCD does have plugins that allow you to submit batch jobs. So, I guess you could write a UCD process to submit a string of jobs to provision a Queue Manager but this would require some effort.

          Currently, the only way that we provide for automated provisioning of IBM MQ for z/OS Queue Managers is via z/OSMF workflows.

          Regards .. Mayur

Join The Discussion

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