BuildForge Help

setenv

Use the <setenv> element to initialize environment variable values within <interface> or <match> elements. The <setenv> element is an empty element; it does not contain other elements. The following example shows the attributes for a <setenv> element:

<setenv group="Adaptor" name="LAST_VER" 
   value="$LAST_VER>$1?$LAST_VER:$1" eval="true"/>

The optional eval attribute identifies whether the value should be logically evaluated; in the example, the LAST_VER variable will be set to the greater of $LAST_VER or the value in the $1 variable. An additional attribute, type, can be used if you do not use the group attribute.

You can use a variable in the value of the name attribute, so that you can set or create variables whose names are not known in advance.

The element can be used in three different ways:

Use the conditional attribute to control whether the <setenv> element initializes or modifies environment variables in <interface> or <match> elements. The value of the conditional attribute is an expression that evaluates to true or false. If the expression evaluates to true, <setenv> initializes or modifies environment variables; otherwise, it does not.