Removing an environment variable

You can remove an environment variable by using the setmqvar command on the command line. You can remove a global environment variable, or a queue manager specific environment variable.

Procedure

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

    mqcli

  2. Remove the environment variable:
    • To remove a global environment variable, enter the following command:

      setmqvar -k Name -d

      Where:
      Name
      Specifies the name of the global environment variable.
      Ensure that the value of Name is correct before you use the command to remove an environment variable. The value of Name is not validated.
    • To remove an environment variable from a specific queue manager, enter the following command:

      setmqvar -m QMgrName -k Name -d

      Where:
      QMgrName
      Specifies the queue manager for which the environment variable is removed.
      Name
      Specifies the name of the queue manager environment variable.
      Ensure that the value of Name is correct before you use the command to remove an environment variable. The value of Name is not validated.
  3. Optional: Exit the IBM MQ administration mode by entering the following command:

    exit

Example

The following example shows the removal of the global environment variable MQSSLRESET:
setmqvar -k MQSSLRESET -d