Types of Configuration Files

Configuration files are used to store sets of configuration options.

They can be created or modified using a text editor or, in some cases, using the utility ZimExplore.

If you decide to create or edit a configuration file, you must enter one option on each physical line of the file; if you use ZimExplore, this utility already provides all options and reads and writes the files for you.

If you want to include a comment in a configuration file, start the comment line with a percent sign (%).

Types of Configuration Files

There are six types of configuration files and their corresponding file names and locations:

Configuration File Type

File Name

Location

Database configuration file

zimconfig.zim

In the Zim database

Zim Server configuration file

zimconfig.srv

Where Zim was installed

Zim Databases configuration file

zimdb.zim

Where Zim was installed

Zim Backup configuration file

zimbk.zim

Where Zim was installed

Foreign directories configuration file

dirs.zim

In the Zim database

Areas configuration file

areas.zim

In the Zim database

Database Configuration File

The database configuration file specifies options that are to be identical for all users of a particular application database. It contains options to describe the way an application is presented, how certain memory parameters have to be dealt, etc.

Each database can have only one database configuration file. This configuration file must be located in the operating system directory where the database resides.

Every time a user starts a Zim session using a particular database, its corresponding database configuration file is read and the existing valid configuration options become available to the running Zim program. Configuration options that either omitted or invalid get their values from the defaults.

This file is optional and does not need to be present in each database because, in most cases, the default options are quite general and apply to most Zim applications.

If you change this configuration file while a Zim session is running, the changes will not affect the session.

All valid database configuration options are described in the section called "Database Configuration Options".

Zim Server Configuration File

The Zim Server configuration file specifies configuration for Zim Server to operate. It must be located in the operating system directory where the Zim software was installed (on Unix, this place is called $ZIM).

The configuration options for Zim Server are taken when Zim Server starts only.

Even though this file is optional and does not need to be present when Zim Server starts, it is a good idea to set its parameters to the specific needs and resources available.

All valid Zim Server configuration options are described in the section called "Zim Server Configuration Options".

Zim Databases Configuration File

The Zim databases configuration file tells Zim Server what are the databases that need to be serviced. It is read when Zim Server starts only and it is located in the operating system directory where the Zim software was installed (on Unix, this place is called $ZIM).

This file is obligatory and must contain at least one reference to a database

Each line of this file contains a reference to a Zim database in this format:

<database number>;<database name>;<location of the database>;

Where:

<database number> is an unique identification number for this database ranging from 1 to 240;

<database name> is an unique name of the database. This is the name that should be used by Zim executables when connecting to a particular database. The rules to create names are the same as Zim uses: maximum 18 characters long, but no special characters. The name is not case sensitive;

<location of the database> is the exact place in the network where the database resides. When Zim Server starts, it checks for the existence of the database and performs some actions before allowing the first user to connect to it.

All three parameters above cannot be repeated in the same configuration file.

An example of zimdb.zim file is:

% 1;MyTest;c:\mytest\xxx    % This database is ignored by Zim Server

22;Example;/usr/zim/example

12;sales;t:\databases\sales

Zim Backup Configuration File

The Zim backup configuration file tells Zim Backup Server what are the databases that are going to be backed up. Its structure is exactly the same as described in the databases configuration file and it is located in the operating system directory where the Zim software was installed (on Unix, this place is called $ZIM).

Foreign Directories Configuration File

The foreign directories configuration file informs where Zim can find a foreign directory in case of an ACCESS command is issued.

This file (dirs.zim) is located in the database directory and is read by Zim Server upon its start only.

Each entry in the foreign directories file has the format:

<dirid> <file number> <path>

where

<dirid> is the DirId of the foreign directory as defined in the entity set Dirs;

<file number> is the number of the file that corresponds to the directory in the host database (i.e. nnnn to zimnnnn);

<path> is the location where this directory can be found together with the correspondent zimnnnn.ws directory.

For example, the entry

23 126 \usr\tools

means that the directory whose DirId is 23 can be found in the file \usr\tools\zim0126

Areas Configuration File

The areas configuration file enables the distribution of Zim database files within the limits of the network. Its main purpose is to relocate files to places different from where the database is sitting. A good example is to move a very large Zim file to another disk drive, thus spreading disk activity to more than one physical disk.

Zim files that can be referenced by the areas configuration file are those corresponding to entity sets, relationships, directories and compiled application programs.

The areas file (areas.zim) is located in the database directory and it is read by Zim Server upon its start only.

Entries in the areas file indicate the locations to which particular files were distributed, one entry per line, and each  entry must take the form:

<nnnn> <path>

where

<nnnn> is the number taken from the file name (i.e. ZIMnnnn) of the file that corresponds to the desired directory, entity set or relationship.

<path> is the name of the operating system directory where file ZIMnnnn is to be found. If ZIMnnnn is a file that stores a Zim directory, then <path> is also the location where the operating system sub-directory for compiled application programs (ie ZIMnnnn.WS) is found.

<Path> can be preceded by three of the same special relocation prefixes used with document file names (see special document file names). The table below describes the meaning of the prefixes when used with path.

Prefix and Path

Interpretation

)path

The user's work directory path is added to the front of path.

"path

The user's database directory is added to the front of path. This choice is useful when you are working with foreign directories.

#path

The directory defined by the Zim environment variable in the registry.

It's only needed to specify entries for Zim files that need to be relocated. Zim files not referenced will be assumed to be in the usual place, that is, the database directory.

An example of areas.zim file:

0103 c:\databases\example   % the file is found in c:\databases\example\zim0103

0250 "                                  % the file is found in <database directory>\zim0250