This variable allows you to specify a list of strings to prefix to a file name before searching for that name in the configuration file or environment. Data and code file search paths are described in more detail in Code and Data File Search Paths.

When searching for a file alias:

  1. The runtime constructs the file alias name by prepending the first string listed in FILE_ALIAS_PREFIX to the file name and searches for that name in the environment or configuration file.
  2. If the name is not found, the runtime constructs a new name by prepending the second string in FILE_ALIAS_PREFIX to the file name and searches for that alias.

This process is repeated with each string in FILE_ALIAS_PREFIX until a file alias name is found or the end of the list is reached.

For example, with:

SELECT file1-name ASSIGN TO "FILE1".

by default, the runtime looks for a configuration or environment variable named "FILE1" and, if found, substitutes its value for the file name. If you specify:


the runtime first looks for "FILE1" and, if not found, looks for "DD_FILE1".

The default value of FILE_ALIAS_PREFIX is an empty string (""). Specifying an empty string as an entry in FILE_ALIAS_PREFIX causes the runtime to search for the file name itself as an alias name. Up to 4096 characters can be specified for the value of this variable.

Note: Separate strings by one or more spaces. A space is a valid separator on all systems. On UNIX systems, you can also separate entries with a colon. On Windows systems, a semicolon can be used and on VMS systems, a comma can be used. Strings can be enclosed in quotation marks. You can specify an empty string using two consecutive quotation marks.

Note on using with EXPAND_ENV_VARS

If you use the EXPAND_ENV_VARS configuration variable and the file name includes a dollar sign ($), the FILE_ALIAS_PREFIX logic is applied to the environment variable name. For example, if EXPAND_ENV_VARS is set to 1 (on, true, yes), "$FILE1" and "FILE1" are treated the same.

For example, with:


the following statement,


causes the runtime to search for an environment or configuration variable named "DD_DIR2" (instead of "DIR2") and, if found, substitute its value for "$DIR2".