For this topic's original documentation, see The config.bbx Configuration File.
BBj goes through the following steps to locate the configuration file:
If the -cpath/file option is used in the command line (see Invoking BBj, Command Line Options), BBj will try only path/file.
If an environment variable BBCONFIG=path/file exists, BBj will try only path/file.
Finally, if neither the -c option nor an environment variable BBCONFIG is set, BBj will try to locate config.bbx in the current directory and then in the ../cfg directory. Note that BBj is usually run from the <bbj>/bin directory, therefore the .. translates to <bbj>/cfg directory.
FCBCACHE does not affect the behavior of an OPEN in BBj if the filename given is not a fully qualified path and if a similarly named field exists in the cache.
Serial devices, only supported on Linux and Windows ports, must be aliased in the config.bbx file. The first character for the aliased device must start with a "C", and the list of modes is as follows:
baud=integer, mode=5|6|7|8 + E|O|N|M+ 1|2 dsr | -dsr, cts | -cts, xon | -xon, xoff | -xoff, xon/xoff | -xon/xoff
For example:
ALIAS C1 COM1 "comport1" BAUD=9600,MODE=8N1,XON/XOFF
Prior to BBj 4.01, the variables on command lines for pipes expanded before running the actual pipe command. This allowed the substitution of an empty string for variables not defined in the environment. When a command in the pipe changes a variable, subsequent commands do not recognize the change because the substitution for the variables occurred before it executed the pipe.
In BBj 4.01 and higher, there are no substitutions from the environment for any variables on the pipe's command line. Instead, BBj Services pass the current environment to the Runtime.exec() command. This allows the various commands in the pipe to expand (and/or change) the variables, however, it removes the side effect of defining undefined variables as empty strings. To force the variable to expand before executing the pipe command, use a MODE setting to set the variable.