Adding a value to the configuration file

You can add a value or modify an existing value in the configuration file of a queue manager by using the setmqini command on the command line.

About this task

You can use the setmqini command to add values to the qm.ini file, which is used for general queue manager configuration, or the mqat.ini file, which is used to control application activity trace. The stanza that you specify as an argument to setmqini determines which file the value is written to.

Procedure

  1. Enter the IBM® MQ administration mode by entering the following command:

    mqcli

  2. Add or modify the value to the qm.ini file by entering the following command:

    setmqini -m QMgrName -s Stanza -k KeyName -v Value

    Where:
    QMgrName
    Specifies that the configuration file that is associated with the specified queue manager is to be modified.
    Stanza
    Specifies which stanza the value is to be added to.
    The following values for Stanza modify the qm.ini file:
    • Log
    • TCP
    • Channels
    • DiagnosticMessages
    • InstanceData
    • TuningParameters
    • SSL
    • Security
    • Service (only valid when combined with -n AuthorizationService)
    • Subpool
    • AutoConfig
    • AutoCluster
    • Variables
    The following value for Stanza modifies the mqat.ini file.
    • AllActivityTrace
    The following values for stanza modify the mqs.ini file
    • DiagnosticSystemMessages
    • DiagnosticMessagesTemplate
    For more information about Diagnostic Messages, see IBM MQ diagnostic message services.
    Do not edit the qm.ini file to control the number of channels. Instead, use the MAXINST and MAXINSTC values on your SVRCONN channels. For more information, see Queue manager configuration on the IBM MQ Appliance.
    KeyName
    Specifies which key to add or modify.
    Ensure that the value of KeyName is correct before you use the command to add a key and value from the stanza. The value of KeyName is not validated. If incorrect values are specified in the qm.ini file, a subsequent attempt to start the queue manager might fail.
    See Configuring trace levels for details of keys that you can add or modify to the mqat.ini file.
    Value
    Specifies the value to add for the specified key name.
    If Value is a string that contains spaces, it must be enclosed in double quotation marks. Any double quotation marks that are used in the Value must be escaped by using a backslash ( \ ).
    Ensure that the value of Value is correct before you use the command to add a value to the stanza. The value of Value is not validated. If incorrect values are specified in the qm.ini file, a subsequent attempt to start the queue manager might fail.
  3. Optional: Exit the IBM MQ administration mode by entering the following command:

    exit

Example

The following example shows the addition of the key RemoteQueueAccessControl with a value of Xmitq to the stanza Security in the qm.ini file of queue manager QM1:
setmqini -m QM1 -s Security -k RemoteQueueManagerAccessControl -v Xmitq
The following example shows the key TraceLevel being set to HIGH in the mqat.ini file.
setmqini -m QM1 -s AllActivityTrace -k TraceLevel -v HIGH