ENVIRONMENT_VARIABLE

The ENVIRONMENT_VARIABLE element provides the value to be set for an environment variable.

Syntax

<ENVIRONMENT_VARIABLE Id=name [ Concat={"APPEND"|"PREPEND"} ] > env </ENVIRONMENT_VARIABLE>
  1. name specifies the name of the environment variable.
  2. Concat specifies a concatenation operator. It defines how an existing setting from a parent configuration is inherited. It is optional. The default is to omit the attribute and to ignore inherited values.
  3. env sets the value of the environment variable.

Child elements

There are no child elements.

Usage

You use this type of element to set the environment for the application. Prior to the start of the application, the environment variable is set using this information.

<ENVIRONMENT_VARIABLE Id="FGLGUI">1</ENVIRONMENT_VARIABLE>

In this example, the environment variable FGLGUI is set to "1", the default graphic user interface (GUI) mode. (The application starts in text user interface (TUI) mode if FGLGUI is set to "0".)

<ENVIRONMENT_VARIABLE Id="FGLWSDEBUG">3</ENVIRONMENT_VARIABLE>

In this example, the environment variable FGLWSDEBUG is set to turn on debug information display in web services. (To enable web services debug, set FGLWSDEBUG to 1, 2, or 3 depending on the level of debug information required. If FGLWSDEBUG is set to "0", debug is turned off.)

Examples with Concat attribute for FGLPROFILE

You would use this configuration if your application or service is configured for its own FGLPROFILE in an external xcf file, but you also wanted to take settings from the default GAS as.xcf configuration as the parent configuration.

In this case, you would set the Concat attribute to "APPEND" or "PREPEND", depending on the order you want to handle the inherited settings. A separator is applied internally via the $(res.path.separator) resource.
APPEND

In this example, the Concat attribute is set to "APPEND" in order to take the FGLPROFILE environment variable setting coming from the parent configuration after the current one.

<ENVIRONMENT_VARIABLE Id="FGLPROFILE" Concat="APPEND">/myapp/myfglprofile</ENVIRONMENT_VARIABLE>
PREPEND

In this example, the Concat attribute is set to "PREPEND" in order to place the FGLPROFILE environment variable setting coming from the parent configuration before the current one.

<ENVIRONMENT_VARIABLE Id="FGLPROFILE" Concat="PREPEND">/opt/myfglprofile</ENVIRONMENT_VARIABLE>
Default

In this example, the parent configuration is discarded and only the current one is used. This is the default behavior. The Concat attribute is not used.

<ENVIRONMENT_VARIABLE Id="FGLPROFILE">/myapp/myfglprofile</ENVIRONMENT_VARIABLE>

Parent elements