The Open Client/Server runtime configuration file is a text file. The file is separated into sections, each of which begins with a section name enclosed in square brackets ([]) and ends with the next section name or the end of the file, whichever appears first.
Each section contains one or more settings, as illustrated below:
[section name] keyword = value ; comment keyword = value
; more comments
[next section name]
... and so forth ...
In general, all supported keywords in the file match the names of the symbolic constants that would identify the property, option, or capability in a Client-Library/C program. However, not all properties can be set in the configuration file. If a keyword is not supported, the setting is ignored.
Legal values adhere to the following rules:
If an item’s value in a C program takes symbolic constants, then the legal values are the names of these constants. For example:
CS_NETIO = CS_SYNC_IO
If an item’s value in a C program takes integer values, then legal values match the legal range of integer values. For example:
CS_TIMEOUT = 60
If an item’s value in a C program takes boolean values, then legal values are CS_TRUE and CS_FALSE. For example:
CS_DIAG_TIMEOUT = CS_TRUE
If an item’s value in a C program takes character strings, then the string is typed directly into the file. For example:
CS_USERNAME = winnie
Some string values must be quoted. If a string contains leading white space, trailing white space, or the semicolon (;) comment character, then the value must be quoted. Also, null string values must be indicated by consecutive quotes. For example:
CS_APPNAME = " Monthly report; Financials "
CS_PASSWORD = ""
Long string values are continued on a subsequent line by escaping the end-of-line with a backslash (\). If an unescaped end-of-line occurs in a quoted string, it is read as part of the value. Finally, literal backslashes in a string value must be doubled.
If a property’s value in a C program takes pointers to a datatype other than CS_CHAR, the property cannot be set through external configuration. The sole exception is the CS_LOCALE keyword, which has the same effect as configuring a CS_LOCALE structure and installing it as a context or connection’s CS_LOC_PROP property. For example, this line would assign the French locale to the context or connection:
CS_LOCALE = french
If a keyword occurs twice in a section, only the first definition is used.
A section can include the keywords in another section using this syntax:
[section name] include = previous section name
... more settings ...
All settings defined under an included section name are defined in a section that includes that section. An included setting is always replaced by an explicit setting in the including section. For example, the Finance section, below, defines CS_TIMEOUT as 30. The included setting from the DEFAULT section is replaced by an explicit setting:
[DEFAULT]
CS_TIMEOUT = 45
[Finance]
include = DEFAULT
CS_TIMEOUT = 30