Writing programs to administer IBM MQ for z/OS
We can write your own application programs to administer a queue manager. Use this topic to understand the requirements for writing your own administration programs.
- Start of General-use programming interface information
-
This set of topics contains hints and guidance to enable you to issue IBM MQ commands from an IBM MQ application program.
Note: In this topic, the MQI calls are described using C-language notation. For typical invocations of the calls in the COBOL, PL/I, and assembler languages, see Function calls manual. - Understand how it all works
-
In outline, the procedure for issuing commands from an application program is as follows:
- Build an IBM MQ command into a type of IBM MQ message called a request message. The command can be in MQSC or PCF format.
- Send (use MQPUT ) this message to a special queue called the system-command input queue. The IBM MQ command processor runs the command.
- Retrieve (use MQGET ) the results of the command as reply messages on the reply-to queue. These messages contain the user messages that we need to determine whether your command was successful and, if it was, what the results were.
Then it is up to the application program to process the results.
This set of topics contains:
- Preparing queues for administration programs
Administration programs require a number of predefined queues for system command input and receiving responses. - Use the command server
The command server is an IBM MQ component that works with the command processor component. We can send formatted messages to the command server which interprets the messages, runs the administration requests, and sends responses back to your administration application. - Retrieving replies to your commands
The command server sends a response to a reply queue for each request message it receives. Any administration application must receive, and handle the reply messages. - Interpreting the reply messages from the command server
Each request message correctly processed by IBM MQ produces at least two reply messages. Each reply message contains a single IBM MQ user message. - If we do not receive a reply
There are a series of steps we can take if we do not receive a response to request to the command server. - Passing commands using MGCRE
With appropriate authorization, an application program can make requests to multiple queue managers using a z/OS service routine. - Examples of commands and their replies
Use this topic as a series of examples of commands to the command server and the responses from the command server.
Parent topic: Administer IBM MQ for z/OS