Use MQGem tools with IBM MQ on IBM Cloud

Using MQSCX to administer an IBM Cloud queue manager

When you connect to a queue manager using MQSCX, you can either invoke the MQSCX tool from the command line with all the information it needs to connect to the queue manager, or you can use the =conn command once MQSCX is running.

Command line

To invoke MQSCX on the command line with all the information it needs to connect to the queue manager, use a command like the following supplying your own queue manager name on the -m flag, and your own connection name details in place of mine in the conname attribute.

mqscx -m MORAGEXPMQ -d "channel(CLOUD.ADMIN.SVRCONN) conname(xxxxxxxxxxxxxxx.mqcloud.ibm.com(nnnnn)) user(admin) pwd(*)"

The use of pwd(*) means that the password is not part of the invocation of the command, and once MQSCX starts up it will prompt you for the password, and you can paste it in (using Ctrl-V) and it will stay hidden.

MQSCX Extended MQSC Program – Version 9.0.2

Licenced to Paul Clarke

Licence Location: Headquarters

QM(MORAGEXPMQ) User(admin) password >

Using the =conn command

If MQSCX is already running, and you want to switch to be connected to a queue manager you can use the =conn command as follows. Supply your own queue manager name in the qm attribute, and your own connection name details in place of mine in the conname attribute.

MQSCX Extended MQSC Program – Version 9.0.2

Licenced to Paul Clarke

Licence Location: Headquarters

> =conn qm(MORAGEXPMQ) channel(CLOUD.ADMIN.SVRCONN) conname(xxxxxxxx

xxxxxxx.mqcloud.ibm.com(nnnnn)) user(admin) pwd(*)

As above it will then prompt you for the password which keeps it hidden. You can if you wish, supply the password in the pwd attribute if no-one is looking over your shoulder!

Now you can issue MQSC commands to your IBM Cloud queue manager.

2 thoughts on “Use MQGem tools with IBM MQ on IBM Cloud

The team at MQGem would love to hear what you think. Leave your comments here.

This site uses Akismet to reduce spam. Learn how your comment data is processed.