Use the runmqsc command to issue MQSC commands to a queue manager. MQSC commands enable you to perform administration tasks, for example defining, altering, or deleting a local queue object. MQSC commands and their syntax are described in the WebSphere MQ Script (MQSC) Command Reference.
You can invoke the runmqsc command in three ways:
Indirect mode operation is performed through the default queue manager.
The runmqsc command takes its input from stdin. When the commands are processed, the results and a summary are put into a report that is sent to stdout.
By taking stdin from the keyboard, you can enter MQSC commands interactively.
By redirecting the input from a file, you can run a sequence of frequently-used commands contained in the file. You can also redirect the output report to a file.
Each command is sent as an Escape PCF to the command queue (SYSTEM.ADMIN.COMMAND.QUEUE) of the target queue manager.
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.
Indirect mode operation is performed through the default queue manager.
This flag is ignored if the -v flag is specified.
00 | MQSC command file processed successfully |
10 | MQSC command file processed with errors; report contains reasons for failing commands |
20 | Error; MQSC command file not run |
runmqscNow you can enter MQSC commands directly at the command prompt. No queue manager name is specified, so the MQSC commands are processed on the default queue manager.
runmqsc -v BANK < "/u/users/commfile.in" runmqsc -v BANK < "c:\users\commfile.in"This command verifies the MQSC commands in file commfile.in. The queue manager name is BANK. The output is displayed in the current window.
runmqsc < "/var/mqm/mqsc/mqscfile.in" > "/var/mqm/mqsc/mqscfile.out" runmqsc < "c:\Program Files\IBM\WebSphere MQ\mqsc\mqscfile.in" > "c:\Program Files\IBM\WebSphere MQ\mqsc\mqscfile.out"In this example, the output is directed to file mqscfile.out.