system-command input queue, on the system-command input queue, messages" />
Putting messages on the system-command input queue
Use the MQPUT call to put request messages containing commands on the system-command input queue. In this call you specify the name of the reply-to queue that you have already opened.
To use the MQPUT call:
- Set these MQPUT parameters:
- Set these MQMD fields:
- MsgType
- MQMT_REQUEST
- Format
- MQFMT_STRING or MQFMT_NONE
If you are not using the same code page as the queue manager, set CodedCharSetId as appropriate and set MQFMT_STRING, so that the command server can convert the message. Do not set MQFMT_ADMIN, as that causes your command to be interpreted as PCF.
- ReplyToQ
- Name of your reply-to queue.
- ReplyToQMgr
- If you want replies sent to your local queue manager, leave this field blank. If you want your WebSphere MQ commands to be sent to a remote queue manager, put its name here. You must also have the correct queues and links set up, as described in the WebSphere MQ Intercommunication manual.
- Set any other MQMD fields, as required. You should normally use nonpersistent messages for commands.
- Set any PutMsgOpts options, as required.
If you specify MQPMO_SYNCPOINT (the default), follow the MQPUT call with a syncpoint call.
Using MQPUT1 and the system-command input queue
If you want to put just one message on the system-command input queue, we can use the MQPUT1 call. This call combines the functions of an MQOPEN, followed by an MQPUT of one message, followed by an MQCLOSE, all in one call. If you use this call, modify the parameters accordingly. See the WebSphere MQ Application Programming Guide for details.