Automate the provisioning of IBM MQ objects
Samples are supplied to automate the provisioning of queue managers and local queues.
Automate the provisioning or de-provisioning of IBM MQ queue managers and perform actions against the provisioned queue managers
The following queue manager specific sample z/OSMF workflows are provided:Workflow name | Description |
---|---|
provision.xml | Provision an IBM MQ for z/OS queue managerThis
sample workflow:
An environment property can be set to control the provisioning of queue managers with different characteristics. For more information, see Running the workflows.Note: A manifest file (provision.mf) is provided to assist with adding a template for this workflow. This file contains a reference to the qaas_readme.pdf file which contains additional information. We can access the file through a link, once the template has been added. |
deprovision.xml | De-provision an IBM MQ for z/OS queue managerThis
sample workflow:
|
startQMgr.xml | Start an IBM MQ for z/OS queue manager
This sample workflow starts the queue manager (which also starts the channel initiator and TCP/IP listener). |
stopQMgr.xml | Stop an IBM MQ for z/OS queue manager
This sample workflow stops the channel initiator (which also stops the TCP/IP listener) and the queue manager. |
Each workflow performs one or more steps. Comments in the workflows explain the function performed by each step. Some of the steps just request data input, while some steps submit JCL, invoke REXX execs, Shell scripts, or issue REST API calls to accomplish the stated function.
Refer to each step for the exact name of the JCL or REXX exec files. The workflows and associated JCL or REXX exec files reference variables that are declared in one or more variable XML files. For more details, see Workflow variable declaration files.
deprovision, startQMgr, and stopQMgr can be performed as actions against a provisioned IBM MQ for z/OS queue manager.
Automate the provisioning or de-provisioning of IBM MQ local queues and perform actions against the provisioned queues
The following queue specific sample z/OSMF workflows are provided:Workflow name | Description |
---|---|
defineQueue.xml | Define a local queueThis sample workflow demonstrates how z/OSMF workflows can be used to define small, medium, or large sized queues based on property settings.Note: A manifest file (provision.mf) is provided to assist with adding a template for this workflow. This file contains a reference to the qaas_readme.pdf file which contains additional information. We can access the file through a link, once the template has been added. |
displayQueue.xml | Display selected attributes of a local queue
This sample workflow displays selected attributes of a local queue. The attributes are returned in a z/OSMF variable (refer to the steps in the workflow for the name of the variable) and subsequently displayed. If required, the contents of the variable can be accessed using a REST API. For more details, refer to the REST APIs for Cloud Provisioning documented in the z/OSMF Programming Guide, and also see z/OSMF workflow services. |
deleteQueue.xml | Delete a local queue
This sample workflow deletes a local queue on a specified queue manager. |
putQueue.xml | Put one or more messages to a local queue.
This sample workflow puts one or more messages to a local queue. The message text can be specified but if more than one message is put to a local queue at the same time, the same message text is used. |
getQueue.xml | Get one or more messages from a local queue.
This sample workflow gets one or more messages from a local queue. The messages are returned in a z/OSMF variable (refer to the steps in the workflow for the name of the variable) and subsequently displayed. If required, we can access the contents of the variable using a REST API. For more details, refer to the REST APIs for Cloud Provisioning documented in the z/OSMF Programming Guide, and also see z/OSMF workflow services. |
loadQueue.xml | Load messages from a data set to a local queue.
This sample workflow loads messages from a data set on to a local queue. The default name of the data set is specified by setting a property. For more details, see Running the workflows. |
offloadQueue.xml | Offload messages from a local queue to a data set.
This sample workflow off-loads messages from a local queue to a data set. The default name of the data set is specified by setting a property. For more details, see Running the workflows. |
clearQueue.xml | Clear messages on a local queue.
This sample workflow clears (deletes) all messages on a local queue. |
- The Put Queue action allows you to enter some message data and put one or more messages onto a queue. If more than one message is to be placed onto a queue during a given request, the same message data is used.
- The loadQueue.xml and offloadQueue.xml workflows invoke the executable module, CSQUDMSG in the
SCSQLOAD library, with an alias of QLOAD. This is equivalent to the dmpmqmsg
utility available with IBM MQ for Multiplatforms. Therefore messages
loaded from a data set onto a queue, or from a queue onto a data set, are expected to be in the
dmpmqmsg
format.
Sample JCL is also provided as member CSQ4QLOD in SCSQPROC.
The easiest way to try out the loadQueue and offloadQueue actions is to do the following:- Issue putQueue a few times to put some messages on to a queue.
- Use offloadQueue to offload the messages from the queue on to a data set.
- If required, issue clearQueue to remove all messages from the queue.
- Use loadQueue to load the messages from a data set onto the same or a different queue.
If we are interested in the dmpmqmsg format, we can browse the contents of the data set, once you have issued an Offload request.
- We can perform displayQueue, deleteQueue, putQueue, getQueue, loadQueue, offloadQueue, and clearQueue as actions against a provisioned IBM MQ for z/OS local queue. For further details about actions and action files, refer to the z/OSMF Programming Guide.
- All action related workflows are deleted by default. The reason for this is to minimize the need
for users to cleanup workflows.
The problem with this however is that where an action results in some output. For example, the displayQueue and getQueue actions both produce output.
The output cannot be seen since the related workflow is deleted as soon as the action has been performed. So, if you drive the workflow actions from the z/OS WUI, set the cleanAfterComplete flag to false on the <workflow> tag for each action whose output we want to see.
For example, to see the output of displayQueue, set the flag as follows:<action name="displayQueue"> <workflow cleanAfterComplete="false"> ... ... </workflow> </action>
However, this means that you then have to manually clean up action related workflows.
Each sample z/OSMF workflow performs one or more steps. Comments in the workflows explain the function performed by each step. Some of the steps just request data input while some steps submit JCL and others invoke REXX execs to accomplish the stated function.
Refer to each step for the exact name of the JCL or REXX exec files. The workflows and associated JCL or REXX exec files reference variables that are declared in one or more Workflow variable declaration files.
Parent topic: Use IBM z/OSMF to automate IBM MQRelated concepts