+

Search Tips | Advanced Search

Administration using PCF commands on IBM i

The purpose of IBM MQ programmable command format (PCF) commands is to allow administration tasks to be programmed into an administration program. In this way we can create queues and process definitions, and change queue managers, from a program.

PCF commands cover the same range of functions provided by MQSC commands. However, unlike MQSC commands, PCF commands and their replies are not in a text format that we can read.

We can write a program to issue PCF commands to any queue manager in the network from a single node. In this way, we can both centralize and automate administration tasks.

Each PCF command is a data structure that is embedded in the application data part of an IBM MQ message. Each command is sent to the target queue manager using the MQI function MQPUT in the same way as any other message. The command server on the queue manager receiving the message interprets it as a command message and runs the command. To get the replies, the application issues an MQGET call and the reply data is returned in another data structure. The application can then process the reply and act accordingly.

Briefly, these are some of the things the application programmer must specify to create a PCF command message:

    Message descriptor
    This is a standard IBM MQ message descriptor, in which:

    • Message type (MsgType) is MQMT_REQUEST.
    • Message format (Format) is MQFMT_ADMIN.

    Application data
    Contains the PCF message including the PCF header, in which:

    • The PCF message type (Type) specifies MQCFT_COMMAND.
    • The command identifier specifies the command, for example, Change Queue (MQCMD_CHANGE_Q).

Escape PCFs are PCF commands that contain MQSC commands within the message text. We can use PCFs to send commands to a remote queue manager. See Use the MQAI to simplify the use of PCFs for further information.

For a complete description of the PCF data structures and how to implement them, see Structures for commands and responses.

Parent topic: Alternative ways of administering IBM MQ for IBM i

Last updated: 2020-10-04