Home
Hints and tips for configuring WebSphere MQ
The MQAI uses PCF messages to send administration commands to the command server rather than dealing directly with the command server itself. Here are some tips for configuring WebSphere MQ using the MQAI:
- Character strings in WebSphere MQ are blank padded to a fixed length. Using C, null-terminated strings can normally be supplied as input parameters to WebSphere MQ programming interfaces.
- To clear the value of a string attribute, set it to a single blank rather than an empty string.
- It is recommended that you know in advance the attributes that you want to change and that you inquire on just those attributes. This is because the number of attributes that can be returned by the Inquire Queue (Response) command is higher than the number of attributes that can be changed using the Change Queue command. (See part 1 of this book for details of these commands.) Therefore, you are not recommended to attempt to modify all the attributes that you inquire.
- If an MQAI call fails, some detail of the failure is returned to the response bag. Further detail can then be found in a nested bag that can be accessed by the selector MQHA_BAG_HANDLE. For example, if an mqExecute call fails with a reason code of MQRCCF_COMMAND_FAILED, this information is returned in the response bag. However, a possible reason for this reason code is that a selector specified was not valid for the type of command message and this detail of information is found in a nested bag that can be accessed via a bag handle.
The following diagram shows this: