To run MQSC commands remotely, set up two channels, one for each direction, and their associated transmission queues. This example assumes that you are using TCP/IP as the transport type and that you know the TCP/IP address involved.
The channel source.to.target is for sending MQSC commands from the source queue manager to the target queue manager. Its sender is at source.queue.manager and its receiver is at target.queue.manager. The channel target.to.source is for returning the output from commands and any operator messages that are generated to the source queue manager. You must also define a transmission queue for each channel. This queue is a local queue that is given the name of the receiving queue manager. The XMITQ name must match the remote queue manager name in order for remote administration to work, unless you are using a queue manager alias. Figure 8 summarizes this configuration.
See WebSphere MQ Intercommunication for more information about setting up channels.
On the source queue manager (source.queue.manager), issue the following MQSC commands to define the channels, listener, and the transmission queue:
DEFINE CHANNEL ('source.to.target') + CHLTYPE(SDR) + CONNAME (RHX5498) + XMITQ ('target.queue.manager') + TRPTYPE(TCP)
DEFINE CHANNEL ('target.to.source') + CHLTYPE(RCVR) + TRPTYPE(TCP)
DEFINE LISTENER ('source.queue.manager') + TRPTYPE (TCP)
DEFINE QLOCAL ('target.queue.manager') + USAGE (XMITQ)
Issue the following commands on the target queue manager (target.queue.manager), to create the channels, listener, and the transmission queue:
DEFINE CHANNEL ('target.to.source') + CHLTYPE(SDR) + CONNAME (RHX7721) + XMITQ ('source.queue.manager') + TRPTYPE(TCP)
DEFINE CHANNEL ('source.to.target') + CHLTYPE(RCVR) + TRPTYPE(TCP)
DEFINE LISTENER ('target.queue.manager') + TRPTYPE (TCP)
DEFINE QLOCAL ('source.queue.manager') + USAGE (XMITQ)
Start both listeners by using the following MQSC commands:
START LISTENER ('source.queue.manager')
START LISTENER ('target.queue.manager')
Start both sender channels by using the following MQSC commands:
START CHANNEL ('source.to.target')
START CHANNEL ('target.to.source')
If WebSphere MQ receives an inbound attach request and cannot find an appropriate receiver or server-connection channel, it creates a channel automatically. Automatic definitions are based on two default definitions supplied with WebSphere MQ: SYSTEM.AUTO.RECEIVER and SYSTEM.AUTO.SVRCONN.
You enable automatic definition of receiver and server-connection definitions by updating the queue manager object using the MQSC command, ALTER QMGR (or the PCF command Change Queue Manager).
For more information about creating channel definitions automatically, see WebSphere MQ Intercommunication. For information about automatically defining channels for clusters, see WebSphere MQ Queue Manager Clusters.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
prep |