Defining configuration variable values with environment variables

You can avoid customizing a configuration variable for specific deployments by defining configuration variable values as operating system environment variables. At run time, the $GETENV() function resolves aliases that are defined as environment variables. The $GETENV() function can be used with or without encryption.


  1. Use an operating system environment variable to define the value. For example, on a Microsoft Windows system, use Control Panel > System > Advanced system settings > Advanced > Environment Variables. The environment variable might be case-sensitive, depending on the operating system.
  2. In the configuration variable, specify the value as $GETENV(env_var) where env_var is the environment variable name. The string must not contain any spaces. The $GETENV() function is not case sensitive.

    If the specified environment variable is not defined, the $GETENV() function resolves to an empty (zero-byte) string.


An informational log file message like the following indicates environment variable usage. For example:
DTXLN2154I - Fri Feb 10 07:32:21 2017 - tid: 12068 inst: -1 - Resource Registry Info : Alias [username] uses environment variable [USERNAME] (mresname.c:1243)