AE environment variable Include Files
The AE functionality enables inclusion of external files during AE registration. The included files contain environment variable assignments and may include other files as well. The included files can exist on the shared NFS file system or as text-only NPS shared library files. See Working with AE Shared Libraries for more information on NPS system shared library files. Inclusion takes place at runtime, not during registration.
NZAE_INCLUDE_BEFORE_1=/nz/export/ae/applications/dev/dave/config/test1.txt
NZAE_INCLUDE_AFTER_1=/nz/export/ae/applications/dev/dave/config/test2.txt
NZAE_INCLUDE_AFTER_2=%[MY_TEXT_FILE]
The contents of file test1.txt and test2.txt are application-specific AE environment variable assignments. For example, test1.txt might include:
TESTVAR1=VALUE1
TESTVAR2=VALUE2
TESTVAR3=VALUE3
The contents of file test2.txt might include:
TESTVAR1=VALUE1NEW
TESTVAR4=VALUE2
TESTVAR5=VALUE3
In the case of this example, the variable assignment of TESTVAR1 to VALUE1NEW will override the first setting (in test1.txt) of VALUE1. Note that this is only true of include files, not straight registration. If the same variable name is registered twice (not using include files) the result is unpredictable. See Order of Variable Parsing for more information.
Top-level registration AE environment variables are those defined directly through nzudxcompile or register_ae during registration. Entries that start with NZAE_INCLUDE_BEFORE are included before the top-level registration environment variables; entries that start with NZAE_INCLUDE_AFTER are included after the top-level registration environment variables. Multiple "include before" and "include after" statements are added in alphabetical order; variables inside the include files are added in definition order. The top-level environment variables are processed in alphabetical order. This means that under AE, the registration environment variables have a definitive, predictable order. Later defined variables of the same name can replace earlier values. However, the top-level registration environment variable key names must not duplicate other top level variable key names.
While included files are processed in the order that variables are declared, top-level registration variables are processed in alphabetical order based on the value after any location prefixes are processed and removed.
VAR_C=val3
NZAE_HOST_ONLY_VAR_B=val2
VAR_A=val1On the host, in an include file these variables are processed in the order VAR_C, VAR_B, VAR_A, but when set as top-level environment variables, they are processed in order VAR_A, VAR_B, VARC_C.