runmqsc (run MQSC commands)

Run MQSC commands on a queue manager.

Purpose

You can use the runmqsc command to start the runmqsc prompt for a queue manager. From the runmqsc prompt you can directly enter MQSC commands to perform administration tasks. For example, you can define, alter, or delete a local queue.

Syntax

Read syntax diagramSkip visual syntax diagram runmqsc   -e -fFilepath   -v   -u UserID   -w WaitTime  -x -m LocalQMgrNameQMgrName

Parameters

-e
Specifies that the source text of the MQSC commands is not copied into a report.
This parameter is useful when you enter commands interactively.
-f filepath
Read the input to be processed from the specified file rather than standard input. The supplied filepath should be a uri in either mqbackup:/// or mqtemporary://

/.
-v
Specifies that the commands entered are to be verified without performing the action.
You cannot use this parameter with a remote queue manager. That is, the -w and -x parameters are ignored if specified at the same time as -v.
-u UserID
Specifies the user ID that the queue manager is accessed with. You are prompted for a matching password.
-w WaitTime
Specifies that the MQSC commands are to be run on a remote queue manager. The WaitTime specifies how many seconds the command waits for replies from the queue manager. Any replies received after this time are discarded, but the MQSC commands still run.
The WaitTime must be a value in the range 1 - 999999.
The replies are received on queue SYSTEM.MQSC.REPLY.QUEUE and the outcome is added to the report. This can be defined as either a local queue or a model queue.
You must have the required channel and transmission queues set up for this. See Configuring queue managers for remote administration in the IBM® MQ documentation.

This parameter is ignored if the -v parameter is specified.

-x
Specifies that the remote queue manager is running under z/OS. The MQSC commands are then written in a form suitable for the z/OS command queue.
This parameter applies only if the -w parameter is also specified.
-m LocalQMgrName
Specifies the local queue manager that you want to use to submit commands to the remote queue manager.
The default value is the local default queue manager.
This parameter applies only if the -w parameter is also specified.
QMgrName
Specifies the name of the target queue manager on which to run the MQSC commands.
The default value is the default queue manager.

Usage notes

  • This command must be run from the IBM MQ administration mode. If the system is in the IBM MQ administration mode the prompt includes mqa(mqcli)#. To enter the IBM MQ administration mode, enter mqcli on the command line. To exit the IBM MQ administration mode, enter exit on the command line.
  • To stop the runmqsc command, use the end command. You can also use the exit or the quit command.
  • For a full list of MQSC commands and their syntax, see The MQSC commands in the IBM MQ documentation.
  • The runmqsc command on the appliance takes its input directly from the terminal, therefore you can enter MQSC commands interactively from the keyboard at the mqcli prompt. In some cases, for example, automating a complex set of steps, you might want to run runmqsc remotely from a distributed IBM MQ client. You can then place your commands in a file and redirect the input from that file (see runmqsc).
  • When the commands are processed, the results and a summary are put into a report that is sent to your terminal. You might wish to capture this output to a file for reporting purposes, details on how to do this depend on your SSH client. Alternatively, you can run runmqsc from an IBM MQ client and redirect the output to a file.

Examples

  • The following command starts the runmqsc prompt for the default queue manager:
    runmqsc
    
  • The following command starts the runmqsc prompt for the queue manager QM1:
    runmqsc QM1
    
From the runmqsc prompt you can directly enter MQSC commands.