End Message Queue Manager (ENDMQM)
- Where allowed to run
- All environments (*ALL)
- Threadsafe
- Yes
The End Message Queue Manager (ENDMQM) command ends the specified local message queue manager or all queue managers. The attributes of the message queue managers are not affected and it can be restarted using the Start Message Queue Manager (STRMQM) command.
We can also use this command to fully quiesce all application programs connected to the queue manager or all queue managers.
The ENDMQM command's default parameters should not be changed with the CHGCMDDFT (Change Command Default) command.
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
MQMNAME | Message Queue Manager name | Character value, *DFT | Optional, Positional 1 |
OPTION | Option | *CNTRLD, *IMMED, *WAIT, *PREEMPT | Optional, Positional 2 |
INSTANCE | Instance To End | *ALL, *STANDBY | Optional, Positional 3 |
ALWSWITCH | Allow Switchover | *NO, *YES | Optional, Positional 4 |
RECONN | Reconnect | *NO, *YES | Optional, Positional 5 |
ENDCCTJOB | End connected jobs | *NO, *YES | Optional, Positional 6 |
RCDMQMIMG | Record MQ Object Image | *NO, *YES | Optional, Positional 7 |
TIMEOUT | Timeout interval (seconds) | 0-3600, 30 | Optional, Positional 8 |
Message Queue Manager name (MQMNAME)
>Specifies the name of the message queue manager.
The possible values are:
- *DFT
- Use the default queue manager.
- queue-manager-name
- Specify the name of the queue manager. The name can contain up to 48 characters. The maximum number of characters is reduced if the system is using a double byte character set (DBCS).
- *ALL
- All queue managers are ended.
Option (OPTION)
>Specifies whether processes that are connected to the queue manager are allowed to complete.
The possible values are:
- *CNTRLD
- Allow programs currently being processed to complete. An MQCONN call (or an MQOPEN or MQPUT1, which perform an implicit connection) fails. If ENDCCTJOB(*YES) is specified, a controlled shutdown of the queue manager is attempted ten times. If the queue manager shuts down successfully, it is followed by immediate termination of the processes that are still connected to it.
- *IMMED
- End the queue manager immediately. All current MQI calls complete, but subsequent requests for MQI calls fail. Incomplete units of work are rolled back when the queue manager is next started. If ENDCCTJOB(*YES) is specified, a controlled shutdown of the queue manager is followed if necessary, after an interval of TIMEOUT seconds, by an immediate shutdown of the queue manager. This is followed by immediate termination of processes connected to it.
- *WAIT
- End the queue manager in the same way as the *CNTRLD option. However, control is returned only after the queue manager has stopped. This option is not allowed with MQMNAME(*ALL). If ENDCCTJOB(*YES) is specified, a single controlled shutdown of the queue manager is issued, which waits for all processes to disconnect. When this completes it is followed by the actions described in the ENDCCTJOB parameter.
- *PREEMPT
- Use this type of shutdown only in exceptional circumstances The queue manager stops without waiting for applications to disconnect or for MQI calls to complete. This can give unpredictable results for IBM MQ applications. All processes in the queue manager that fail to stop are ended 30 seconds after the command is issued. This option is not allowed with ENDCCTJOB(*YES).
Instance To End (INSTANCE)
>Specifies whether to end all instances of a queue manager, or to end just a standby queue manager instance.
The possible values are:
- *ALL
- All instances of a queue manager are to be ended. This option can only be requested against a
non-standby queue manager instance.
If a standby instance is running elsewhere, the ALWSWITCH parameter on the ENDMQM command will control whether the standby instance is itself ended.
- *STANDBY
- Only the standby queue manager instance should be ended, any active queue queue manager instance will continue to run. This option can only be requested against a standby queue manager instance.
Allow Switchover (ALWSWITCH)
>Specifies whether switchover to a standby instance of the queue manager is allowed when the active queue manager instance has ended.
The possible values are:
- *NO
- Switchover to a standby queue manager instance is not allowed. Any standby instances that are running will also end on successful completion of this command. P:. Reconnectable client applications connected to this queue manager are instructed to disconnect.
- *YES
- Switchover to a standby queue manager instance is attempted, if a standby queue manager instance
is not running this command will fail and the active queue manager instance will remain active.
Reconnectable client applications connected to this queue manager instance are instructed to begin reconnect processing, to maintain connectivity.
Reconnect (RECONN)
>Specifies whether client applications currently connected to this queue manager should attempt to reconnect to a queue manager instance.
The possible values are:
- *NO
- Reconnectable client applications connected to this queue manager are instructed to disconnect.
- *YES
- Reconnectable client applications connected to this queue manager are instructed to begin reconnect processing, to maintain connectivity.
End connected jobs (ENDCCTJOB)
>Specifies whether all processes connected to the queue manager are forcibly terminated.
The possible values are:
- *NO
- The queue manager or queue managers are ended but no further action is taken.
- *YES
- The following steps are taken for each queue manager to be ended:
- If the queue manager is running and RCDMQMIMG(*YES) has been specified, media images for all objects defined for the queue manager are recorded.
- The queue manager is ended in the appropriate manner (*CNTRLD, *WAIT, or *IMMED).
- All shared memory and semaphores used by the queue manager are deleted irrespective of whether applications have disconnected from the queue manager. Applications that have not disconnected from a a shared memory resource when this option is specified receive a return code of MQRC_CONNECTION_BROKEN (2009) the next time an MQI call is issued with an existing connection handle.
Record MQ Object Image (RCDMQMIMG)
>Specifies whether media images are recorded for a queue manager.
The possible values are:
- *YES
- If the queue manager is running, media images for all queue manager objects are recorded.
- *NO
- Media images of queue manager objects are not recorded as part of the quiesce.
Timeout interval (seconds) (TIMEOUT)
>Specifies the time interval in seconds between the controlled and immediate shutdowns of the queue manager when *IMMED is specified. It also determines the number of seconds between attempts to shut down the queue manager when *CNTRLD is specified.
The possible values are:
- 30
- The default value is 30 seconds.
- timeout-interval
- Specify a value in seconds, in the range 0 through 3600.
Examples
>None
Error messages
>Unknown
Parent topic: CL commands reference for IBM i