Create the queue
Create the local queue that is used to receive messages on the target queue manager, and the listener that accepts the inbound channel connection.
After you have started the runmqsc scripting tool, we can use MQSC commands to create a local queue and listener.
Procedure
-
Start the scripting tool by typing the following command:
runmqsc QM2
A message is displayed to confirm that the tool has started. -
Create a local queue called RECEIVEQUEUE. The queue must have the same name as referred to in the remote queue definition on the source queue manager. In the MQSC interface, type:
DEFINE QLOCAL(RECEIVEQUEUE) DESCR('Receiving queue')
The local queue is created. -
Create a listener called LISTENER1. In the MQSC interface, type:
DEFINE LISTENER(LISTENER1) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
Note: Port 1414 is the default port for IBM MQ . If you chose a different port number, we must add it to the CONNAME of the sender channel on the sending queue manager. -
Start the listener so it is ready to accept inbound connections. In the MQSC interface, type:
START LISTENER(LISTENER1)
Note: Since the listener was created with the option CONTROL(QMGR), next time the queue manager is started, the listener will also be automatically started. - Type end to exit the MQSC interface.