Channel functions


The channel functions available are shown in Table 9. Here some more detail is given about the channel functions.

 

Create

You can create a new channel definition using the default values supplied by WebSphere MQ, specifying the name of the channel, the type of channel you are creating, the communication method to be used, the transmission queue name and the connection name.

The channel name must be the same at both ends of the channel, and unique within the network. However, restrict the characters used to those that are valid for WebSphere MQ object names.

 

Change

Use the MQSC command ALTER CHANNEL to change an existing channel definition, except for the channel name, or channel type.

 

Delete

Use the MQSC command DELETE CHANNEL to delete a named channel.

 

Display

Use the MQSC command DISPLAY CHANNEL to display the current definition for the channel.

 

Display Status

The MQSC command DISPLAY CHSTATUS displays the status of a channel whether the channel is active or inactive. It applies to all message channels.

Information displayed includes:

  • Channel name
  • Communication connection name
  • In-doubt status of channel (where appropriate)
  • Last sequence number
  • Transmission queue name (where appropriate)
  • The in-doubt identifier (where appropriate)
  • The last committed sequence number
  • Logical unit of work identifier
  • Process ID
  • Thread ID (OS/2 and Windows only)

 

Ping

Use the MQSC command PING CHANNEL to exchange a fixed data message with the remote end. This gives some confidence to the system supervisor that the link is available and functioning.

Ping does not involve the use of transmission queues and target queues. It uses channel definitions, the related communication link, and the network setup. It can only be used if the channel is not currently active.

It is available from sender and server channels only. The corresponding channel is started at the far side of the link, and performs the startup parameter negotiation. Errors are notified normally.

The result of the message exchange is presented as Ping complete or an error message.

 

Ping with LU 6.2

When Ping is invoked, by default no USERID or password flows to the receiving end. If USERID and password are required, they can be created at the initiating end in the channel definition. If a password is entered into the channel definition, it is encrypted by WebSphere MQ before being saved. It is then decrypted before flowing across the conversation.

 

Start

Use the MQSC command START CHANNEL for sender, server, and requester channels. It should not be necessary where a channel has been set up with queue manager triggering.

Also use the START CHANNEL command for receiver channels that have a disabled status, and for server-connection channels that have a disabled status. Starting a receiver or server-connection channel that is in disabled status resets the channel and allows it to be started from the remote channel.

When started, the sending MCA reads the channel definition file and opens the transmission queue. A channel start-up sequence is executed, which remotely starts the corresponding MCA of the receiver or server channel. When they have been started, the sender and server processes await messages arriving on the transmission queue and transmit them as they arrive.

When you use triggering or run channels as threads, you will need to start the channel initiator to monitor the initiation queue. Use the runmqchi command for this.

However, TCP and LU 6.2 do provide other capabilities:

  • For TCP on OS/2, Compaq OpenVMS Alpha, and UNIX systems, inetd (or an equivalent TCP/IP service on OpenVMS) can be configured to start a channel. This will be started as a separate process.

  • For LU 6.2 in OS/2, using Communications Manager/2 it is possible to configure the Attach Manager to start a channel. This will be started as a separate process.

  • For LU 6.2 in UNIX systems, configure your SNA product to start the LU 6.2 responder process.

  • For LU 6.2 in Windows systems, using SNA Server you can use TpStart (a utility provided with SNA Server) to start a channel. This will be started as a separate process.

  • For LU 6.2 in Compaq OpenVMS Alpha systems, use the runmqlsr command to start the LU 6.2 responder process.

  • For LU 6.2 in Compaq NonStop Kernel, the strmqm command normally starts the LU 6.2 responder process if your channel is defined AUTOSTART (ENABLED). To start the process manually, use the runmqsc or runmqchl command.

Use of the Start option always causes the channel to re-synchronize, where necessary.

For the start to succeed:

  • Channel definitions, local and remote, must exist. If there is no appropriate channel definition for a receiver or server-connection channel, a default one is created automatically if the channel is auto-defined. See Channel auto-definition exit program.

  • Transmission queue must exist, and have no other channels using it.

  • MCAs, local and remote, must exist.

  • Communication link must be available.

  • Queue managers must be running, local and remote.

  • Message channel must not be already running.

A message is returned to the screen confirming that the request to start a channel has been accepted. For confirmation that the start command has succeeded, check the error log, or use DISPLAY CHSTATUS. The error logs are:

OS/2 and Windows
\mqm\qmgrs\qmname\errors\AMQERR01.LOG (for each queue manager called qmname)

\mqm\qmgrs\@SYSTEM\errors\AMQERR01.LOG (for general errors)

Note:
On Windows systems, you still also get a message in the Windows systems application event log.

Compaq OpenVMS Alpha
MQS_ROOT:[MQM.QMGRS.QMNAME.ERRORS]AMQERR01.LOG (for each queue manager called qmname)

MQS_ROOT:[MQM.QMGRS.$SYSTEM.ERRORS]AMQERR01.LOG (for general errors)

Compaq NonStop Kernel
The location of the error logs depends on whether the queue manager name is known and whether the error is associated with a client.

  • If the queue manager name is known and the queue manager is available:
           <QMVOL>.<SUBVOL>L.MQERRLG1

  • If the queue manager is not available:
           <MQSVOL>.ZMQSSYS.MQERRLG1

UNIX systems
/var/mqm/qmgrs/qmname/errors/AMQERR01.LOG (for each queue manager called qmname)

/var/mqm/qmgrs/@SYSTEM/errors/AMQERR01.LOG (for general errors)

 

Stop

Use the MQSC command STOP CHANNEL to request the channel to stop activity. The channel will not start a new batch of messages until the operator starts the channel again. (For information about restarting stopped channels, see Restarting stopped channels.)

This command can be issued to a channel of any type except MQCHT_CLNTCONN.

You can select the type of stop you require:

 

Stop quiesce example

STOP CHANNEL(PARIS.TO.LONDON) MODE(QUIESCE)

This command requests the channel to close down in an orderly way. The current batch of messages is completed and the syncpoint procedure is carried out with the other end of the channel.

Note:
If the channel is idle this command will not terminate a receiving channel.

 

Stop force example

STOP CHANNEL(PARIS.TO.LONDON) MODE(FORCE)

This option stops the channel immediately, but does not terminate the channel's thread or process. The channel does not complete processing the current batch of messages, and can, therefore, leave the channel in doubt. In general, it is recommended that operators use the quiesce stop option.

 

Stop terminate example

STOP CHANNEL(PARIS.TO.LONDON) MODE(TERMINATE)

This option stops the channel immediately, and terminates the channel's thread or process.

 

Stop (quiesce) stopped example

STOP CHANNEL(PARIS.TO.LONDON) STATUS(STOPPED)

This command does not specify a MODE, so will default to MODE(QUIESCE). It requests that the channel be stopped so that it cannot be restarted automatically but must be started manually.

 

Stop (quiesce) inactive example

STOP CHANNEL(PARIS.TO.LONDON) STATUS(INACTIVE)

This command does not specify a MODE, so will default to MODE(QUIESCE). It requests that the channel be made inactive so that it will be restarted automatically when required.

 

Reset

Use the MQSC command RESET CHANNEL to change the message sequence number. This command is available for any message channel, but not for MQI channels (client-connection or server-connection). The first message starts the new sequence the next time the channel is started.

If the command is issued on a sender or server channel, it informs the other side of the change when the channel is restarted.

 

Resolve

Use the MQSC command RESOLVE CHANNEL when messages are held in-doubt by a sender or server, for example because one end of the link has terminated, and there is no prospect of it recovering. The RESOLVE CHANNEL command accepts one of two parameters: BACKOUT or COMMIT. Backout restores messages to the transmission queue, while Commit discards them.

The channel program does not try to establish a session with a partner. Instead, it determines the logical unit of work identifier (LUWID) which represents the in-doubt messages. It then issues, as requested, either:

  • BACKOUT to restore the messages to the transmission queue; or

  • COMMIT to delete the messages from the transmission queue.

For the resolution to succeed:

  • The channel must be inactive

  • The channel must be in doubt

  • The channel type must be sender or server

  • A local channel definition must exist

  • The local queue manager must be running

 

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.