Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

c-treeRTG Configuration File

The configuration of c-treeRTG is controlled by an XML file called ctree.conf by default. Because it is an XML file, it uses the same syntax for both Windows and Unix/Linux.

The c-treeRTG Configuration Tool, RTG Config, is provided to greatly simplify configuration. To get the most out of your c-treeRTG system, it is important to know its layout and to understand the c-treeRTG configuration options available. In this way, your system can be configured to best suit your needs.

Configuration File Format

The XML configuration file uses a tree structure that follows the hierarchy of parent/child relationships described below:

  • <config> - The <config> element is the root of the XML configuration file. As the root element, it is the parent of the child elements below it. It is used as a container for all the other elements. It does not have any attributes.
    • Settings Elements - The <config> root element may contain zero or more global settings, which apply to the entire hierarchy unless overridden at a lower level. The settings elements configure the desired settings, such as turning data compression on or off.
    • <instance> - The <config> root element can contain zero or more <instance> elements.

    Each <instance> element represents a connection to the c-treeRTG server. When creating a new instance, you will need to supply the server name, user name, password, etc., which are attributes of the element. (If no <instance> element is present in the configuration file, the system will use a default of <instance server="FAIRCOMS">.)

    Settings applied within the <config> root element apply to all <instance> elements within the root element.

    • Settings Elements - Within each <instance> element there can be zero or more settings elements. Each settings element specifies an optional configuration setting, such as turning data compression on or off, which applies only to its parent instance.
    • <file> - Within an <instance> element there can be zero or more <file> elements. Each <file> element specifies the configuration for one or more files identified by a name and/or dir (directory) attribute. Wildcard file matching rules can be used.
    • Each <file> element can have multiple attributes (e.g., name) and settings elements (e.g., compression, encryption, transaction processing).

Structure Elements, Settings Elements, and Attributes

The <config> root element, the <instance> (and <redirinstance>) elements, and the <file> element are called Structure Elements because they define the architectural structure of your particular c-treeRTG system.

Most structure elements have attributes that provide details to describe the element (e.g., a file element uses a name or directory attribute to specify one or more files).

The structure elements may contain Settings Elements. These elements configure the desired settings for their parent structure element. For example, a <file> element may use a <datacompress> settings element to turn data compression on or off for certain files (which are specified by attributes of the <file> element).

Remember: The configuration file is a hierarchy, so settings made at a higher level (closer to the root) can be overridden by settings applied to an individual child element. Settings specified by Option Elements in a child element overwrite the values inherited from higher levels in the hierarchy. The following rules apply:

  • Settings applied within an <instance> or <file> element apply only to that element.
  • Settings applied within an <instance> or <file> element override settings inherited from higher levels in the hierarchy.
  • Settings applied within an <instance> element apply to all <file> elements specified within that element. 

Setting elements can be specified as children of <config>, <instance>, and <file> but actually apply only to file elements if a setting element is not specified as a child of <file>.

c-treeRTG considers file extensions to be part of the file name. If you want to override the suffix, use the <datafilesuffix> configuration option.

If no file paths are specified, the LOCAL_DIRECTORY setting in ctsrvr.cfg comes into play. This implies that ctree.conf takes precedence over ctsrvr.cfg.

See Also

TOCIndex