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
Parameters
- -e
- Specifies that the source text of the MQSC commands is not copied into a report.
- -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.
- -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.
- -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.
- -m LocalQMgrName
- Specifies the local queue manager that you want to use to submit commands to the remote queue manager.
- QMgrName
- Specifies the name of the target queue manager on which to run the MQSC commands.
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, entermqclion the command line. To exit the IBM MQ administration mode, enterexiton 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
mqcliprompt. 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
runmqscprompt for the default queue manager:runmqsc - The following command starts the
runmqscprompt for the queue managerQM1:runmqsc QM1
runmqsc prompt you can directly enter MQSC commands. 