crtmqenv
Create a list of environment variables for an installation of IBM® WebSphere® MQ, on UNIX, Linux®, and Windows.
Purpose
You can use the crtmqenv command to create a list of environment variables with the appropriate values for an installation of IBM WebSphere MQ. The list of environment variables is displayed on the command line, and any variables that exist on the system have the IBM WebSphere MQ values added to them. This command does not set the environment variables for you, but gives you the appropriate strings to set the variables yourself, for example, within your own scripts.
If you want the environment variables set for you in a shell environment, you can use the setmqenv command instead of using the crtmqenv command.
You can specify which installation the environment is created for by specifying a queue manager name, an installation name, or an installation path. You can also create the environment for the installation that issues the crtmqenv command by issuing the command with the -s parameter.
- CLASSPATH
- INCLUDE
- LIB
- MANPATH
- MQ_DATA_PATH
- MQ_ENV_MODE
- MQ_FILE_PATH
- MQ_JAVA_INSTALL_PATH
- MQ_JAVA_DATA_PATH
- MQ_JAVA_LIB_PATH
- MQ_JAVA_JVM_FLAG
- MQ_JRE_PATH
- PATH
Usage notes
The crtmqenv command removes all directories for all IBM WebSphere MQ installations
from the environment variables before adding new references to the
installation for which you are setting up the environment. Therefore,
if you want to set any additional environment variables that reference IBM WebSphere MQ, set the variables
after issuing the crtmqenv command. For example,
if you want to add
to LD_LIBRARY_PATH, you must do so after running crtmqenv.MQ_INSTALLATION_PATH
/java/lib
Syntax
Required Parameters
- -m QMgrName
- Create the environment for the installation associated with the queue manager QMgrName.
- -n InstallationName
- Create the environment for the installation named InstallationName.
- -p InstallationPath
- Create the environment for the installation in the path InstallationPath.
- -r
- Remove all installations from the environment.
- -s
- Create the environment for the installation that issued the command.
Optional Parameters
- -k
- UNIX and Linux only.
- -l
- UNIX and Linux only.
- -x Mode
- Mode can take the value 32, or 64.
- -i
- List only the additions to the environment.
Return codes
Return code | Description |
---|---|
0 | Command completed normally. |
10 | Command completed with unexpected results. |
20 | An error occurred during processing. |
Examples
The following examples assume that a copy of IBM WebSphere MQ is installed in /opt/mqm on a UNIX or Linux system.- This command creates a list of environment variables for an installation
installed in /opt/mqm:
/opt/mqm/bin/crtmqenv -s
- This command creates a list of environment variables for an installation
installed in /opt/mqm2, and includes the path
to the installation at the end of the current value of the LD_LIBRARY_PATH variable:
/opt/mqm/bin/crtmqenv -p /opt/mqm2 -l
- This command creates a list of environment variables for the queue
manager
QM1
, in a 32-bit environment:/opt/mqm/bin/crtmqenv -m QM1 -x 32
- This command creates a list of environment variables for an installation
called
installation1
:"c:\Program Files\IBM\WebSphere MQ\crtmqenv" -n installation1