Data Dictionary Configuration File


The BASIS configuration file, most commonly named config.tpm, is an ASCII text file that identifies the location of the data and dictionary files. The file must contain the paths to the DICTIONARY and DATA directories but can also contain global path and login information. The following is an example of a standard config.tpm file:

# Demo Database Configuration
DICTIONARY=c:\basis\ddbuild\examples\demo\bbdict\
DATA=c:\basis\ddbuild\examples\demo\data\

Configuration File Guidelines

#if, #else, #endif conditionals

  • Two forms allowed:

#if expression
global assignment(s)
#endif

#if expression
global assignment(s)
#else
global assignment(s)
#endif

  • If the expression condition is true, then any lines between #else and #endif are ignored.

  • If the expression condition is false, then any lines between the #if and #else (or #endif in the first form) are ignored.

#Include statements

  • Causes another configuration file to be parsed at the point the #include is encountered.

  • May appear within quotes.

  • Filename may include global paths.

  • May contain other #include statements

  • In the following example, the global WORK is translated to /usr/asmith/work/. The file, /usr/asmith/work/config.me, is parsed for global assignments:

HOME=/usr/asmith/
WORK=(HOME)work/
LOCAL_CONFIG=(WORK)config.me
#include LOCAL_CONFIG

Conditional blocks

  • May be nested.

  • May take one of four forms. For example:

global
global=value
$environment
$environment=value

  • In the first and third forms, the global or environment variable needs only to exist to register true.

  • In the second and fourth forms, the global or environment variable needs to exist and have the specified value to be regarded as true.

  • Quotation marks within or surrounding the value arguments have no special meaning.

DICTIONARY and DATA directories

  • Must be entered and upper case.

  • Must point to the physical location of the BASIS data dictionary and data files defined in the dictionary, respectively.

  • May reside on a server and may even reside on different servers. In these situations, ensure that a valid server path is included when defining the DICTIONARY and DATA values. For example:

DICTIONARY=/<main,port=1200>/u/confdb/bbdict/
DATA=/<office,port=1400>/u/data/confdb/

  • If the DATA and DICTIONARY directories reside on the same server, the entries must still include the server PATH to the data files and dictionary.

File comments

  • Indicated by a sentence beginning with a pound sign (#). (The exception to this is the #include statement.)

Forward or backward slashes

  • Either is acceptable for DOS/Windows style paths.

Globals

  • Must be used to resolve the location of the file paths defined in the data dictionary if the data dictionary uses global strings (i.e., literals enclosed in parentheses). The following is an example of global path definitions used in a configuration file:

# Demo Database Configuration
PROJECT=c:\basis\ddbuild\examples\demo\
DICTIONARY=(PROJECT)bbdict\
DATA=(PROJECT)data\

  • May refer to current environment variables. In the following example, the "$" before "HOME" indicates that this is an environment reference. If the HOME environment variable does not exist, the BASE global will be set to the null string:

BASE=$HOME
DATA=(BASE)/data/

Another way to accomplish this is to put the environment variable within parentheses. For example:

DATA=($HOME)/data/



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.