IBM Support

MQ Commands to setup two way communication between two queue managers on Sender and Receiver channels

Troubleshooting


Problem

You want to see a complete set of commands to set up the full (both ways) communication between 2 IBM MQ queue managers, using Sender and Receiver channels.

Resolving The Problem

This document provides all the commands. At the end of the process, all the necessary MQ objects will be created to allow the transfer of messages between the queue managers, including instructions on how to test and verify that the objects were configured properly.
.
Two pairs of channels will be created:
   - Sender-Receiver from queue-manager-1 (QM93WIN) in host-1 to queue-manager-2 (QM93LNX) in host-2
   - Sender-Receiver from queue-manager-2 (QM93LNX) in host-2 to queue-manager-1 (QM93WIN) in host-1
.
In addition, the necessary Transmission Queues (XMITQ) and Remote Queue Definitions are created in order to test the setup.
 
The chapters are:
- Chapter 1: Using the sample scripts to generate customized commands
- Chapter 2: List of the runmqsc commands created by the scripts
- Chapter 3: Enabling triggering on Transmission Queue to automatically start Sender channel
- Chapter 4: Miscellaneous: multi-instance, MQ Explorer scheme for Queues
- Chapter 5: Testing
- Chapter 6: Background and References
+++ See attached PDF file

+++ Attachments +++
DISCLAIMER: All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 
+ Updated on 13-May-2020
Two files are provided that can be used to generate the runmqsc commands mentioned in this document:
1 sample Windows batch file: gen-mqsc-2-qmgrs.bat
1 sample Unix shell script: gen-mqsc-2-qmgrs.sh
+ Example of using the scripts to connect 
Host-1 ("arturito" in Windows):   Queue-manager-1: QM93WIN, port 1415
Host-2 ("stmichel1" in Linux):     Queue-manager-2: QM93LNX, port 1414
 
C:\> cd \temp\mq
C:\> "C:\Program Files\IBM\MQ\bin\setmqenv" -n Installation1
C:\> gen-mqsc-2-qmgrs   QM93WIN arturito 1415  QM93LNX stmichel1  1414
C:\> dir *.mqsc
01/30/2024  09:59 AM               508 QM93WIN.QM93LNX.mqsc
01/30/2024  09:59 AM               502 QM93LNX.QM93WIN.mqsc
.
Note: 
You need to review the *.mqsc files and do any appropriate editing.
For example, the first 2 commands are to create a Listener and start it. You can delete those lines if you have already a running listener.
.
You need to run the file that begins with the name of the queue manager that you want to configure.
For example, the following command is for QM93WIN, thus, you need to use the file that begins with QM93WIN
.
C:\> runmqsc -f QM93WIN.QM93LNX.mqsc  QM93WIN
.
Note: You could transfer the 2nd file (QM93LNX.QM93WIN.mqsc) to the remote Linux host or you could use the script to generate the mqsc file in remote host.
.
* In host-2 "stmichel1", queue-manager-2 QM93LNX
.
- If you decide to run the script in the remote host, then you need to KEEP the SAME ORDER of the queue managers that was used in the 1st run of the script, because the script uses 2 different queue names and remote queue definitions.
.
$ cd /home/mqm
$ . /opt/mqm/bin/setmqenv -n Installation1
$ gen-mqsc-2-qmgrs   QM93WIN arturito 1415  QM93LNX stmichel1  1414
$ ls *.mqsc
QM93LNX.QM93WIN.mqsc     
QM93WIN.QM93LNX.mqsc
Note: 
You need to review the *.mqsc files and do any appropriate editing.
For example, the first 2 commands are to create a Listener and start it. You can delete those lines if you have already a running listener.
.
You need to run the file that begins with the name of the queue manager that you want to configure.
For example, the following command is for QM93LNX, thus, you need to use the file that begins with QM93LNX
.
$ runmqsc -f QM93LNX.QM93WIN.mqsc QM93LNX
+ Tags:
Author: Angel Rivera
+++ end +++

[{"Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"ARM Category":[{"code":"a8m0z00000008N4AAI","label":"Connectivity"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Product Synonym

WMQ MQ MQSeries

Document Information

Modified date:
27 March 2024

UID

swg21470997