STOP CHANNEL

Use the MQSC command STOP CHANNEL to stop a channel.

Synonym: STOP CHL

STOP CHANNEL

Read syntax diagramSkip visual syntax diagram STOP CHANNEL ( channel-name ) CONNAME(connection-name)MODE(QUIESCE)MODE(FORCE)MODE(TERMINATE)QMNAME(qmname)STATUS(STOPPEDINACTIVE)

Usage notes for STOP CHANNEL

  1. 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 Channel exit programs.
  2. On z/OS®, the command server and the channel initiator must be running.
  3. Any channels in STOPPED state need to be started manually; they are not started automatically. See Restarting stopped channels for information about restarting stopped channels.
  4. This command can be issued to a channel of any type except CLNTCONN channels (including those that have been defined automatically).
  5. 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 repository.

Parameter descriptions for STOP CHANNEL

(channel-name)
The name of the channel to be stopped. This parameter is required for all channel types.
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
This is the default.
Allows the current batch to finish processing on distributed platforms.
For a receiving channel, if there is no batch in progress, the channel waits for either of the following to take place before it stops:
  • The next batch to start
  • The next heartbeat (if heartbeats are being used)

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

If you issue a STOP CHANNEL channelname MODE (QUIESCE) command on a server-connection channel, the IBM® WebSphere® MQ client infrastructure becomes aware of the stop request in a timely manner. This time is dependent upon the speed of the network.

If a client application is using the server-connection channel and is performing either of the following operations at the time that the command is issued, then the MQPUT or MQGET operation fails:
  • An MQPUT operation with the PMO option MQPMO_FAIL_IF_QUIESCE specified.
  • An MQGET operation with the GMO option MQGMO_FAIL_IF_QUIESCE set.
The client application receives reason code MQRC_CONNECTION_QUIESCING.
If a client application is using the server-connection channel and is performing either of the following operations, then the client application is allowed to complete the MQPUT or MQGET operation:
  • An MQPUT operation without the PMO option MQPMO_FAIL_IF_QUIESCE specified.
  • An MQGET operation without the GMO option MQGMO_FAIL_IF_QUIESCE set.
The next time the application tries to use the server-connection channel, it receives reason code MQRC_CONNECTION_QUIESCING.

If the client application is not performing an MQ API call when the server-connection channel is stopped, it becomes aware of the stop request as a result of issuing a subsequent call to IBM WebSphere MQ and receives return code MQRC_CONNECTION_QUIESCING.

After sending the MQRC_CONNECTION_QUIESCING return code to the client, and allowing any outstanding MQPUT or MQGET operations to complete if necessary, the server ends the client connections for the server-connection channel.

Due to the imprecise timing of network operations, the client application should not attempt further MQ API operations.

FORCE

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

For other channel types, terminates transmission of any current batch. This is likely to result in in-doubt situations.
TERMINATE
On other platforms other than z/OS, 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. For details about channels in STOPPED state, and especially SVRCONN channels, see Restarting stopped channels.
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.

This is the default if QMNAME or CONNAME are specified.