SET MQMONITOR
Enable or disable an MQMONITOR resource definition. Start or stop the MQ monitor. Set automatic restart of the MQ monitor.
Conditions: IOERR, INVREQ, NOTAUTH, NOTFND, TRANSIDERR, USERIDERR
This command is threadsafe.
For more information about the use of CVDAs, see CICS-value data areas (CVDAs).
Description
Use the SET MQMONITOR command to enable or disable an MQMONITOR resource definition (ENABLESTATUS attribute), start or stop the MQ monitor (MONSTATUS attribute), or set automatic restart of the MQ monitor (AUTOSTART attribute).
This command does not set any other MQMONITOR attributes. To change these attributes, you must change the resource definition and then reinstall the resource.
If you want to change the QNAME attribute of a reserved MQMONITOR resource definition DFHMQINI, you must change the INITQNAME attribute of the MQCONN resource definition for which DFHMQINI is installed and then reinstall the MQCONN resource definition.
A request to set the state of an MQMONITOR to started causes CICS® to issue an EXEC CICS START request that specifies the value from TRANSACTION as the TRANID, the value from USERID as the USERID, and, in case of a non-CKTI transaction, the data contained in MONDATA prepended with 18 bytes as the FROM data (see Figure 1). If the EXEC CICS START command fails, see message DFHMQ0390E for diagnostic details.
Byte 1: < (left chevron)
Bytes 2 - 9: MQMONITOR resource name
Bytes 10 - 17: USERID
Byte 18: > (right chevron)
Bytes 19 - 218: MONDATA as entered by the user
For user-written transactions, the started transaction must retrieve the MONDATA contained in the FROM data and use the MQMONITOR resource name specified in bytes 2 - 9 for issuing the EXEC CICS SET MQMONITOR commands to set the state of the monitoring transaction (MONSTATUS attribute). Also note that when security checking is active, CICS performs security checks on the user ID associated with the transaction that attempts to set the MQ monitor state to started. Therefore, ensure that the user ID associated with the transaction that attempts to set the MQ monitor state to started is a surrogate of the user ID defined in MONUSERID and is authorized to start transactions associated with the MONUSERID. In the case of setting the MQ monitor state through a CICSPlex® SM API interface such as the CICS Explorer®, the user ID to be associated with the MQ monitor transaction is either the region user ID or the PLTPIUSR user ID (if specified). For more information, see the security considerations described in MQMONITOR resources.
Options
- AUTOSTART(cvda)
- Specifies whether the MQ monitor starts automatically. The CVDA values are as follows:
- AUTOSTART
- The MQ monitor starts automatically in either of the following situations:
- When the connection to the IBM® MQ queue is established.
- If the z/OS Workload Manager (WLM) health service is active (see WLMHEALTH), every increment in the z/OS WLM HEALTH value of the CICS region from zero to 100%. For more information, see Effect of z/OS Workload Manager Health service on MQMONITORs and Alert monitor (CKAM).
- NOAUTOSTART
- The MQ monitor does not start automatically.
- ENABLESTATUS(cvda)
- Specifies whether the MQMONITOR resource definition is available for use. The CVDA values are as
follows:
- ENABLED
- The MQMONITOR resource definition is to be enabled and made available for use.
- DISABLED
- The MQMONITOR resource definition is to be disabled.
- MONSTATUS(cvda)
- Starts or stops the MQ monitor. The CVDA values are as follows:
- STARTED
- The MQ monitor is to be started.
- STOPPED
- The MQ monitor is to be stopped.
- MQMONITOR(data-value)
- Specifies the 8-character name of the MQMONITOR resource to be set.
Conditions
- IOERR
- RESP2 values:
- 10
- An input/output error occurred. This error happens on an EXEC CICS START command typically because file DFHINTRA is full or broken.
Default action: end the task abnormally.
- INVREQ
- RESP2 values:
- 2
- The MQMONITOR cannot be started because the resource is already started.
- 3
- The MQMONITOR cannot be stopped because the resource is already stopped.
- 5
- The MQMONITOR cannot be started because the resource is disabled.
- 6
- An attempt to start the MQ monitor has failed. Verify TRANID and USERID attributes as well as security definitions. Verify that the IBM-supplied CSD definitions for group DFHMQ have been upgraded.
Default action: end the task abnormally.
- NOTAUTH
- RESP2 values:
- 7
- The user is not authorized to start the transaction associated with the MQMONITOR.
- 100
- Command authorization failure.
Default action: end the task abnormally.
- NOTFND
- RESP2 values:
- 1
- The specified MQMONITOR definition cannot be found.
Default action: end the task abnormally.
- TRANSIDERR
- Occurs when an attempt to start the MQMONITOR failed because the transaction identifier specified in a START command is not defined to CICS.
Default action: end the task abnormally.
- USERIDERR
- Occurs when an attempt to start the MQMONITOR failed because the MONUSERID is not known to the
external security manager.
Default action: end the task abnormally.
