Creating a channel
Create two channel definitions, one at each end of the connection. You create the first channel definition at the first queue manager. Then you create the second channel definition at the second queue manager, on the other end of the link.
Both ends must be defined using the same channel name. The two ends must have compatible channel types, for example: Sender and Receiver.
To create a channel definition for one end of the link use the MQSC command DEFINE CHANNEL. Include the name of the channel, the channel type for this end of the connection, a connection name, a description (if required), the name of the transmission queue (if required), and the transmission protocol. Also include any other attributes that you want to be different from the system default values for the required channel type, using the information you have gathered previously.
You are provided with help in deciding on the values of the channel attributes in Channel attributes.
Create channel example
DEFINE CHANNEL(QM1.TO.QM2) CHLTYPE(SDR) +
DESCR('Sender channel to QM2') +
CONNAME(QM2) TRPTYPE(TCP) XMITQ(QM2) CONVERT(YES)
In all the examples of MQSC the command is shown as it appears in a file of commands, and as it
is typed in AIX®, Linux®, and Windows. The two methods look identical,
except that to issue a command interactively, you must first start an MQSC session. Type
runmqsc
, for the default queue manager, or runmqsc
qmname
where qmname
is the name of
the required queue manager. Then type any number of commands, as shown in the examples.
- On Windows use Ctrl-z to end the entry at the command line.
- On AIX and Linux, use Ctrl-d.
- Alternatively, on AIX, Linux, and Windows, use the end command.