Home
Additional environment variables
When a service is started, the environment in which the service process is started is inherited from the environment of the queue manager. It is possible to define additional environment variables to be set in the environment of the service process by adding the variables you want to define to one of the service.env environment override files.
There are two possible files to which we can add environment variables:
- The machine scope service.env file, which is located in /var/mqm on UNIX systems, or in the data directory selected during installation on Windows systems.
- The queue manager scope service.env file, which is located in the queue manager data directory. For example, the location of the environment override file for a queue manager named QMNAME is:
- On UNIX systems, /var/mqm/qmgrs/QMNAME/service.env.
- On Windows systems, C:\\IBM\WebSphere MQ\qmgrs\QMNAME\service.env.
Both files are processed, if available, with definitions in the queue manager scope file taking precedence over those in the machine scope file.
The format of the variables defined in the file, service.env, is a list of name and value variable pairs. Each variable must be defined on a new line, and each variable is taken as it is explicitly defined, including white space. An example of the file, service.env, follows:
#********************************************************************# #* *# #* <N_OCO_COPYRIGHT> *# #* Licensed Materials - Property of IBM *# #* *# #* 63H9336 *# #* *# #* <NOC_COPYRIGHT> *# #* *# #********************************************************************# #***********************************************************************# #* Module Name: service.env *# #* Type : WebSphere MQ service environment file *# #* Function : Define additional environment variables to be set *# #* for SERVICE programs. *# #* Usage : <VARIABLE>=<VALUE> *# #* *# #***********************************************************************# MYLOC=/opt/myloc/bin MYTMP=/tmp TRACEDIR=/tmp/trace MYINITQ=ACCOUNTS.INITIATION.QUEUE
Parent topic:
Working with services
fa11420_
Home