Issuing queue manager commands on z/OS
We can issue IBM MQ control commands from a z/OS console or with the utility program CSQUTIL. Commands can use command prefix string (CPF) to indicate which IBM MQ subsystem processes the command.
We can control most of the operational environment of IBM MQ using the IBM MQ commands. IBM MQ for z/OS supports both the MQSC and PCF types of these commands. This topic describes how to specify attributes using MQSC commands, and so it refers to those commands and attributes using their MQSC command names, rather than their PCF names. For details of the syntax of the MQSC commands, see The MQSC commands. For details of the syntax of the PCF commands, see Use IBM MQ Programmable Command Formats. If we are a suitably authorized user, we can issue IBM MQ commands from:
- The initialization input data sets (described in Initialization commands for IBM MQ for z/OS ).
- A z/OS console, or equivalent, such as SDSF
- The z/OS master get command routine, MGCRE (SVC 34)
- The IBM MQ utility, CSQUTIL (described in IBM MQ utility program.)
- A user application, which can be:
- A CICS program
- A TSO program
- A z/OS batch program
- An IMS program
See Writing programs to administer IBM MQ for z/OS for information about this.
Much of the functionality of these commands is provided in a convenient way by the operations and control panels, accessible from TSO and ISPF, and described in Operations and control panels for IBM MQ for z/OS.
For further information, see
- Issuing commands from a z/OS console or its equivalent
- Issuing commands from the utility program CSQUTIL
Issuing commands from a z/OS console or its equivalent
We can issue all IBM MQ commands from a z/OS console or its equivalent. We can also issue IBM MQ commands from anywhere where we can issue z/OS commands, such as SDSF or by a program using the MGCRE macro.
The maximum amount of data that can be displayed as a result of a command typed in at the console is 32 KB. Note:
- We cannot issue IBM MQ commands using the IMS/SSR command format from an IMS terminal. This function is not supported by the IMS adapter.
- The input field provided by SDSF might not be long enough for some commands, particularly those commands for channels.
- Command prefix strings
Each IBM MQ command must be prefixed with a command prefix string (CPF), as shown in Figure 1.
Because more than one IBM MQ subsystem can run under z/OS, the CPF is used to indicate which IBM MQ subsystem processes the command. For example, to start the queue manager for a subsystem called CSQ1, where CPF is ' +CSQ1 ', we issue the command +CSQ1 START QMGR from the operator console. This CPF must be defined in the subsystem name table (for the subsystem CSQ1). This is described in Defining command prefix strings (CPFs). In the examples, the string ' +CSQ1 ' is used as the command prefix.
- Use the z/OS console to issue commands
We can type simple commands from the z/OS console, for example, the DISPLAY command in Figure 1. However, for complex commands or for sets of commands that we issue frequently, the other methods of issuing commands are better.
- Command responses
Direct responses to commands are sent to the console that issued the command. IBM MQ supports the Extended Console Support (EMCS) function available in z/OS, and therefore consoles with 4 byte IDs can be used. Additionally, all commands except START QMGR and STOP QMGR support the use of Command and Response Tokens (CARTs) when the command is issued by a program using the MGCRE macro.
Issuing commands from the utility program CSQUTIL
We can issue commands from a sequential data set using the COMMAND function of the utility program CSQUTIL. This utility transfers the commands, as messages, to the system-command input queue and waits for the response, which is printed together with the original commands in SYSPRINT. For details of this, see IBM MQ utility program.
- Start and stop a queue manager on z/OS
Use this topic as an introduction to stopping and starting a queue manager.Parent topic: Operate IBM MQ for z/OS