setmqini (set mq ini)

Add or remove an attribute from the qm.ini file of a specified queue manager. Set a value for an attribute in the mqat.ini file. Set or delete a diagnostic message definition in the mqs.ini file.

Purpose

You can use the setmqini command to configure a queue manager by editing the qm.ini file for that queue manager. You can also use the command to configure trace levels in the mqat.ini file. Changes to the values in the mqat.ini file do not take effect until the next time the queue manager is started. You also use the command to define DiagnosticSystemMessages and DiagnosticMessagesTemplate services in the mqs.ini file.

-m option

Read syntax diagramSkip visual syntax diagram setmqini -m QMgrName -sStanza-nObjectName-kKeyName-vValue-d-r

-g option

Read syntax diagramSkip visual syntax diagram setmqini -g -sStanza-nObjectName-kKeyName-vValue-d

Parameters

-m QMgrName
Specifies that the qm.ini file that is associated with the specified queue manager is to be modified.
-g
Specifies that mqs.ini file is to be updated with details of a DiagnosticSystemMessages or a DiagnosticMessagesTemplate service.
-s Stanza
Specifies which stanza of the configuration file is to be added to, or deleted from. The stanza that is specified determines whether the qm.ini or mqat.ini file is changed.
The following values for Stanza modify the qm.ini file:
  • Log
  • TCP
  • Channels
  • DiagnosticMessages
  • InstanceData
  • TuningParameters
  • SSL
  • Security
  • 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
-r
Permanently resets the automatic configuration INI baseline (applicable when a queue manager is a member of a uniform cluster that uses automatic configuration).

When this option is used, the base_qm.ini file is removed from that queue manager. This is the file that is the baseline to which auto-configuration is reapplied on each queue manager start. Specifying the -r option causes the current queue manager configuration to become the baseline on future starts.

-n ObjectName
For DiagnosticSystemMessages, DiagnosticMessages, and DiagnosticMessagesTemplate stanzas, specifies the name of the service being defined or deleted.
-k KeyName
Specifies the key name to add or remove from the qm.ini file, or the key to edit in the mqat.ini file.
Ensure that the value of KeyName is correct before you use the command to add or remove 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.
The valid key names for the various stanzas can be retrieved from the IBM® MQ documentation, by using the following links: The -k argument is not needed if you use the -n ObjectName and -d arguments to delete a diagnostic message service stanza.
-v 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 or remove a key and value from 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. See the topics linked to from the -k keyname description for information about values.
-d
Specifies that the key name specified by the -k parameter is deleted from the qm.ini file.
To delete an entire stanza, each key name must be deleted individually. The exception to this rule is diagnostic message service stanzas. You can delete the entire stanza by specifying the -n parameter to identify the service whose stanza you want to delete.

Usage notes

  • This command must be run from the IBM MQ administration mode. If the system is in the IBM MQ administration mode the prompt includes mqa(mqcli)#. To enter the IBM MQ administration mode, enter mqcli on the command line. To exit the IBM MQ administration mode, enter exit on the command line.
  • 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.
  • The setmqini command does not validate attribute names or values.
  • The setmqini command does not prevent you defining conflicting stanzas or attributes.
  • You should verify configuration file changes in a test environment before updating production systems.
  • For more information about changing the qm.ini file, see qm.ini file stanzas and attributes in the IBM MQ documentation.
  • For more information about the mqat.ini file, see Configuring activity trace behavior using mqat.ini in the IBM MQ documentation.

Examples

  • The following command adds the value Xmitq to the key name RemoteQueueAccessControl in the Security stanza of the qm.ini file of queue manager QM1:
    setmqini -m QM1 -s Security -k RemoteQueueAccessControl -v Xmitq
    
  • The following command deletes the key name and associated value of RemoteQueueAccessControl in the Security stanza of the qm.ini file of queue manager QM1:
    setmqini -m QM1 -s Security -k RemoteQueueAccessControl -d
    
  • The following commands configure a DiagnosticSystemMessages service named SystemErrors that records messages with a severity of error, stop, or system, and writes them to files with the prefix 'SystemErrorsFile'.
    setmqini -g -s DiagnosticSystemMessages -n SystemErrors -k Service -v File
    setmqini -g -s DiagnosticSystemMessages -n SystemErrors -k Severities -v E+
    setmqini -g -s DiagnosticSystemMessages -n SystemErrors -k FilePrefix -v SystemErrorsFile
  • The following command deletes the stanza that defines the DiagnosticSystemMessages service named SystemErrors:
    setmqini -g -s DiagnosticSystemMessages -n SystemErrors -d

Related commands