Introduction to the IBM WebSphere MQ Administration Interface (MQAI)

The IBM® WebSphere® MQ Administration Interface (MQAI) is a programming interface to IBM WebSphere MQ. It performs administration tasks on an IBM WebSphere MQ queue manager using data bags to handle properties (or parameters) of objects in a way that is easier than using Programmable Command Formats (PCFs).

MQAI concepts and terminology

The MQAI is a programming interface to WebSphere MQ, using the C language and also Visual Basic for Windows. It is available on platforms other than z/OS®.
It performs administration tasks on a WebSphere MQ queue manager using data bags. Data bags allow you to handle properties (or parameters) of objects in a way that is easier than using the other administration interface, Programmable Command Formats (PCFs). The MQAI offers easier manipulation of PCFs than using the MQGET and MQPUT calls.
For more information about data bags, see Data bags. For more information about PCFs, see Introduction to Programmable Command Formats

Use of the MQAI

You can use the MQAI to:
  • Simplify the use of PCF messages. The MQAI is an easy way to administer WebSphere MQ; you do not have to write your own PCF messages and thus avoid the problems associated with complex data structures.
  • Handle error conditions more easily. It is difficult to get return codes back from the WebSphere MQ script (MQSC) commands, but the MQAI makes it easier for the program to handle error conditions.
  • Exchange data between applications. The application data is sent in PCF format and packed and unpacked by the MQAI. If your message data consists of integers and character strings, you can use the MQAI to take advantage of WebSphere MQ built-in data conversion for PCF data. This avoids the need to write data-conversion exits. For more information on using MQAI to administer WebSphere MQ and to exchange data between applications, see Using the MQAI to simplify the use of PCFs.

Examples of using the MQAI

The list shown gives some example programs that demonstrate the use of MQAI. The samples perform the following tasks:
  1. Create a local queue. Sample C program for creating a local queue (amqsaicq.c)
  2. Display events on the screen using a simple event monitor. Sample C program for displaying events using an event monitor (amqsaiem.c)
  3. Print a list of all local queues and their current depths. Sample C program for inquiring about queues and printing information (amqsailq.c)
  4. Print a list of all channels and their types. Sample C program for inquiring about channel objects (amqsaicl.c)

Building your MQAI application

To build your application using the MQAI, you link to the same libraries as you do for WebSphere MQ. For information on how to build your WebSphere MQ applications, see Building a WebSphere MQ application .

Hints and tips for configuring WebSphere MQ using MQAI

The MQAI uses PCF messages to send administration commands to the command server rather than dealing directly with the command server itself. Tips for configuring WebSphere MQ using the MQAI can be found in Hints and tips for configuring IBM WebSphere MQ