setmqvar (set mq variable)

Add or remove an environment variable for the appliance or for a specified queue manager.

Purpose

You can use the setmqvar command to configure environment variables for the appliance or for a specified queue manager.

When you set a specific queue manager variable, the changes take effect the next time that the queue manager is started.

When you set a global environment variable, the changes take effect immediately.

Syntax

Read syntax diagramSkip visual syntax diagram setmqvar -mQMgrName --kName -vValue-d

Parameters

-m QMgrName
Specifies the queue manager for which the environment variable is modified.
If this parameter is omitted, the global environment variable is modified.
-k Name
Specifies the name of the environment variable to add or remove.
Ensure that the value of Name is correct before you use the command to add or remove an environment variable.

You can only add environment variables whose names begin with "AMQ", "MQ", or "GSK".

-v Value
Specifies the value to add for the specified environment variable.
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 an environment variable. The value of Value is not validated.
-d
Specifies that the environment variable specified by the -k parameter is deleted.

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.

Examples

  • The following command adds an environment variable AMQ_SERVICE_DEBUG_REPOS with the value of TRUE to the queue manager QM1:
    setmqvar -m QM1 -k AMQ_SERVICE_DEBUG_REPOS -v TRUE
    
  • The following command deletes the global environment variable MQ_DEBUG_MODE:
    setmqvar -k MQ_DEBUG_MODE -d
    

Related commands