How Enterprise Server uses Environment Variables

An enterprise server instance's environment depends on the method you use to start the server instance:

This means that all the environment variables that you need to run your servers' workload, including directory settings for third-party software, can be set in the session where you start the Directory Server. If Directory Server is running as a Windows service, it will have the system environment.

You can set environment variables for an enterprise server instance in Configuration Information on the Add Server or Edit Server page. These apply to all services that run in the server.

Any environment variables set at the service level when the service was created using the Interface Mapping Toolkit override the settings at the server level.

The format for environment variables is:

[ES-Environment]
environment-variable-name=environment-variable-setting

Use a semi-colon to separate elements within the string. For example:

[ES-Environment]
COBPATH=c:\adirectory;c:\anotherdirectory
Note: Micro Focus recommends that you do not set the COBDIR environment variable for an enterprise server instance. This is because $COBDIR is used to point to the product location. The results of setting $COBDIR are undefined.

Use the COBPATH environment variable if you want to specify the location of service programs at the enterprise server level. If you do set the COBPATH environment variable at enterprise server level, you also need to specify "$COBPATH" in Package Path in the Add Package or Edit Package page for services that should be located using COBPATH.

When you specify an environment variable, you can use the resolved value of another already-created variable as part of the environment variable value. To do this, prefix the environment variable you want to include with a dollar ($) sign, for example:

FILEROOT=d:\data
FILEA=$FILEROOT\mydata.dat

This resolves to d:\data\mydata.dat.

If you want to include a dollar sign in an environment variable value as part of the actual value, rather than as an indicator that another environment variable is being referred to, you can enable the dollar sign character to be escaped by inserting a backslash (\) character, for example:

FILEA=\$\$fsserver1\mydata.dat

This resolves to $$fsserver1\mydata.dat

Because of the function of the backslash (\) character as an escape character, if you want the value of an environment variable to be a UNC path (e.g. \\server\volume\directory\filename), be sure that it starts with four backslash characters - \\\\server\volume\directory\filename - rather than two. Each pair of backslash characters resolves to a single character, yielding the correct two-character sequence as a final result.