Replaceable inserts on service definitions
In the definition of a service object, it is possible to substitute tokens. Tokens that are substituted are automatically replaced with their expanded text when the service program is executed. Substitute tokens can be taken from the following list of common tokens, or from any variables that are defined in the file, service.env.
The following are common tokens that can be used to substitute tokens in the definition of a service object:
- MQ_INSTALL_PATH
- The location where IBM MQ is installed.
- MQ_DATA_PATH
- The location of the IBM MQ data directory:
- On UNIX and Linux systems, the IBM MQ data directory location is /var/mqm/
- On Windows systems, the location of the IBM MQ data directory is the data directory selected during the installation of IBM MQ
- QMNAME
- The current queue manager name.
- MQ_SERVICE_NAME
- The name of the service.
- MQ_SERVER_PID
- This token can only be used by the STOPARG and STOPCMD arguments.
For server service objects this token is replaced with the process ID of the process started by the STARTCMD and STARTARG arguments. Otherwise, this token is replaced with 0.
- MQ_Q_MGR_DATA_PATH
- The location of the queue manager data directory.
- MQ_Q_MGR_DATA_NAME
- The transformed name of the queue manager. For more information on name transformation, see Understanding IBM MQ file names.
To use replaceable inserts, insert the token within + characters into any of the STARTCMD, STARTARG, STOPCMD, STOPARG, STDOUT or STDERR strings. For examples of this, see Examples of using service objects.