STOP CHANNEL


Use STOP CHANNEL to stop a channel.

Notes:

  1. On z/OS:

    1. This is valid only for channels used for distributed queuing without CICS. If you are using CICS for distributed queuing, see the WebSphere MQ Intercommunication manual.

    2. The command server and the channel initiator must be running.

  2. Any channels in STOPPED state need to be started manually; they are not started automatically. See the WebSphere MQ Intercommunication manual for information about restarting stopped channels.

  3. This command can be issued to a channel of any type except CLNTCONN channels (including those that have been defined automatically).

  4. Where there is both a locally defined channel and an auto-defined cluster-sender channel of the same name, the command applies to the locally defined channel. If there is no locally defined channel but more than one auto-defined cluster-sender channel, the command applies to the channel that was last added to the local queue manager's repository.

Synonym: STOP CHL

STOP CHANNEL
 
                               .-CHLDISP(PRIVATE)-----. (2)
>>-STOP CHANNEL(channel-name)--+----------------------+--------->
                               |                 (1)  |
                               '-CHLDISP(SHARED)------'
 
   .-CMDSCOPE(' ')------------. (2)
>--+--------------------------+--------------------------------->
   |                     (1)  |
   +-CMDSCOPE(qmgr-name)------+
   |             (1)          |
   '-CMDSCOPE(*)--------------'
 
                                   .-MODE(QUIESCE)---.
>--+----------------------------+--+-----------------+---------->
   '-CONNAME--(connection-name)-'  +-MODE(FORCE)-----+
                                   '-MODE(TERMINATE)-'
 
>--+------------------+--+----------------------------+--------><
   '-QMNAME--(qmname)-'  '-STATUS--(--+-STOPPED--+--)-'
                                      '-INACTIVE-'
 
 

Notes:

  1. Valid only on full function WebSphere MQ for z/OS when the queue manager is a member of a queue-sharing group.

  2. Valid only on z/OS.

 

Parameter descriptions

(channel-name)
The name of the channel to be stopped. This is required.

CMDSCOPE
This parameter applies to z/OS only and specifies how the command is executed when the queue manager is a member of a queue-sharing group.

If CHLDISP is set to SHARED, CMDSCOPE must be blank or the local queue manager.

' '
The command is executed on the queue manager on which it was entered. This is the default value.

qmgr-name
The command is executed on the queue manager you specify, providing the queue manager is active within the queue-sharing group.

You can specify a queue manager name only if you are using a queue-sharing group environment and if the command server is enabled.

*
The command is executed on the local queue manager and is also passed to every active queue manager in the queue-sharing group. The effect of this is the same as entering the command on every queue manager in the queue-sharing group.

CHLDISP
This parameter applies to z/OS only and can take the values of:

In conjunction with the various values of the CMDSCOPE parameter, this parameter controls two types of channel:

SHARED
A receiving channel is shared if it was started in response to an inbound transmission directed to the queue-sharing group.

A sending channel is shared if its transmission queue has a disposition of SHARED.

PRIVATE
A receiving channel is private if it was started in response to an inbound transmission directed to the queue manager.

A sending channel is private if its transmission queue has a disposition other than SHARED.

Note:
This disposition is not related to the disposition set by the disposition of the queue-sharing group of the channel definition.

The combination of the CHLDISP and CMDSCOPE parameters also controls from which queue manager the channel is operated. The possible options are:

The various combinations of CHLDISP and CMDSCOPE are summarized in Table 16

Table 16. CHLDISP and CMDSCOPE for STOP CHANNEL

CHLDISP CMDSCOPE( ) or CMDSCOPE (local-qmgr) CMDSCOPE (qmgr-name) CMDSCOPE(*)
PRIVATE Stop as a private channel on the local queue manager. Stop as a private channel on the named queue manager Stop as a private channel on all active queue managers
SHARED For RCVR and SVRCONN channels, stop as shared channel on all active queue managers.

For SDR, RQSTR, and SVR channels, stop as a shared channel on the queue manager where it is running. If the channel is in an inactive state (not running), or if it is in RETRY state because the channel initiator on which it was running has stopped, a STOP request for the channel is issued on the local queue manager.

This might automatically generate a command using CMDSCOPE and send it to the appropriate queue manager. If there is no definition for the channel on the queue manager to which the command is sent, or if the definition is unsuitable for the command, the command fails.

The definition of a channel on the queue manager where the command is entered might be used to determine the target queue manager where the command is actually run. Therefore, it is important that channel definitions are consistent. Inconsistent channel definitions might result in unexpected command behavior.

Not permitted Not permitted

CONNAME(connection-name)
Connection name. Only channels matching the specified connection name are stopped

MODE
Specifies whether the current batch is allowed to finish in a controlled manner. This parameter is optional.

QUIESCE
Allows the current batch to finish processing, except on z/OS where the channel stops after the current message has finished processing. (The batch is then ended and no more messages are sent, even if there are messages waiting on the transmission queue.)

For a receiving channel, if there is no batch in progress, the channel waits for either:

  • The next batch to start

  • The next heartbeat (if heartbeats are being used)

before it stops.

For server-connection channels, allows the current connection to end.

This is the default.

FORCE
Terminates transmission of any current batch. This is likely to result in in-doubt situations.

For server-connection channels, breaks the current connection, returning MQRC_CONNECTION_BROKEN.

TERMINATE
On z/OS this is synonymous with FORCE. On other platforms, this parameter terminates transmission of any current batch. This allows the command to actually terminate the channel thread or process.

For server-connection channels, breaks the current connection, returning MQRC_CONNECTION_BROKEN.

QMNAME(qmname)
Queue manager name. Only channels matching the specified remote queue manager are stopped

STATUS
Specifies the new state of any channels stopped by this command.

STOPPED
The channel is stopped. For a sender or server channel the transmission queue is set to GET(DISABLED) and NOTRIGGER.

This is the default if QMNAME or CONNAME are not specified.

INACTIVE
The channel is inactive. For a sender or server channel the transmission queue is unaffected.

This is the default if QMNAME or CONNAME are specified.

 

Usage notes

If you specify either QMNAME or CONNAME, STATUS must either be INACTIVE or not specified. Do not specify a QMNAME or CONNAME and STATUS(STOPPED). It is not possible to have a channel stopped for one partner but not for others. This sort of function can be provided by a channel security exit. For more information about channel exits, see the WebSphere MQ Intercommunication manual

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.