Home

 

runmqsc (run MQSC commands)

 

+

Search Tips   |   Advanced Search

 

Purpose

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.

 

Syntax


    .------------------------------.         V |     >>-runmqsc----+--------------------------+-+--+----------+-----><     +- -e ---------------------+ '-QMgrName-'        +- -v ---------------------+         '- -w --WaitTime--+------+-'         '- -x -'    

 

Description

We can invoke the runmqsc command in three ways:

Verify command

Verify MQSC commands but do not run them. An output report is generated indicating the success or failure of each command. This mode is available on a local queue manager only.

Run command directly

Send MQSC commands directly to a local queue manager.

Run command indirectly

Run MQSC commands on a remote queue manager. These commands are put on the command queue on a remote queue manager and run in the order in which they were queued. Reports from the commands are returned to the local queue manager.

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, we can enter MQSC commands interactively.

By redirecting the input from a file, we can run a sequence of frequently-used commands contained in the file. We can also redirect the output report to a file.

 

Optional parameters

-e

Prevents source text for the MQSC commands from being copied into a report. This is useful when you enter commands interactively.

-v

Verifies the specified commands without performing the actions. This mode is only available locally. The -w and -x flags are ignored if they are specified at the same time.

-w WaitTime

Run the MQSC commands on another queue manager. You must have the required channel and transmission queues set up

WaitTime

The time, in seconds, that runmqsc waits for replies. Any replies received after this are discarded, but the MQSC commands still run. Specify a time between 1 and 999 999 seconds.

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.

-x

The target queue manager is running under z/OS. This flag applies only in indirect mode. The -w flag must also be specified. In indirect mode, the MQSC commands are written in a form suitable for the WebSphere MQ for z/OS command queue.

QMgrName

The name of the target queue manager on which to run the MQSC commands, by default, the default queue manager.

 

Return codes

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

 

Examples

  1. Enter this command at the command prompt:
    runmqsc
    Now we 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.

  2. Use one of these commands, as appropriate in your environment, to specify that MQSC commands are to be verified only:
    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.

  3. These commands run the MQSC command file mqscfile.in against the default queue manager.
    runmqsc < "/var/mqm/mqsc/mqscfile.in" > "/var/mqm/mqsc/mqscfile.out"

    runmqsc < "c:\IBM\WebSphere MQ\mqsc\mqscfile.in" > "c:\IBM\WebSphere MQ\mqsc\mqscfile.out"

    In this example, the output is directed to file mqscfile.out.

 

Parent topic:

The control commands

 

Home