Location of the client configuration file

An IBM® MQ MQI client configuration file can be held in a number of locations.

A client application uses the following search path to locate the IBM MQ MQI client configuration file:
  1. The location specified by the environment variable MQCLNTCF.

    The format of this environment variable is a full URL. This means the file name might not necessarily be mqclient.ini and facilitates placing the file on a network attached file-system.

    Notes:
    • C, .NET and XMS clients support only the file: protocol; the file: protocol is assumed if the URL string does not begin with protocol:
    • To allow for Java 1.4.2 JREs, which do not support reading environment variables, the MQCLNTCF environment variable can be overridden with an MQCLNTCF Java System Property.
  2. A file called mqclient.ini in the present working directory of the application.
  3. A file called mqclient.ini in the IBM MQ data directory for Windows, UNIX and Linux® systems.
    notes:
    • The IBM MQ data directory does not exist on certain platforms, for example, IBM i and z/OS®, or in cases where the client has been supplied with another product.
      [IBMi]On IBM i, there is no default mqclient.ini file. However, the file can be created in the IBM i Integrated File System (IFS) in directory /QIBM/UserData/mqm/, and environment variable MQCLNTCF defined to point to it. For example:
      ADDENVVAR ENVVAR(MQCLNTCF) VALUE('QIBM/UserData/mqm/mqclient.ini') REPLACE(*YES)
      For more examples of environment variables, see Environment variables.

      [z/OS]The z/OS platform cannot be used to run IBM MQ clients. Therefore, the mqclient.ini file does not exist on IBM MQ for z/OS.

    • [UNIX][Linux]On UNIX and Linux systems, the directory is /var/mqm
    • [Windows]On Windows platforms you configure the environment variable MQ_DATA_PATH during installation, to point at the data directory. It is normally C:\ProgramData\IBM\MQ
      Note: If you are installing a client only, the environment variable might be MQ_FILE_PATH.
    • To allow for Java 1.4.2 JREs that do not support reading environment variables you can manually override the MQ_DATA_PATH environment variable with an MQ_DATA_PATH Java System Property.
  4. A file called mqclient.ini in a standard directory appropriate to the platform, and accessible to users:
    • For all Java clients this is the value of the user.home Java System Property.
    • [UNIX][Linux]For C clients on UNIX and Linux platforms this is the value of the HOME environment variable.
    • [Windows]For C clients on Windows this is the concatenated values of the HOMEDRIVE and HOMEPATH environment variables.
Note: For the IBM MQ client for HP Integrity NonStop Server, the mqclient.ini file must be located in the OSS file system. Guardian applications must either place the mqclient.ini file in the IBM MQ data directory or set the MQCLNTCF environment variable to a location in the OSS file system.