Configuration Usage

The EUS Toolkit configuration file normally has a root name of config followed by any relevant extension. Any extension is acceptable. This discussion assumes a configuration file called config.EUS. For a description of where the configuration file can be located, see acu.utl. It is possible, and sometimes desirable, to use a separate configuration file for each user in a system or for each installation.

Assume the file config.EUS contains the following:

# config.EUS
# Define Extended Utility Set environment variables
# (Note: Lines starting with '#' are comments)
# Directory paths are specified with '/', even under
# MS-DOS. Paths MUST end in a trailing '/'.
#
# First, define the location of the
# PRO/5 Standard Utilities:
#
BBSTD=/basis/pro5/std/
#
# Now, define the location of the
# PRO/5 Extended Utilities (EUS):
#
BBEXT=/basis/pro5/ext/
#
# If you are using any Data Dictionary routines,
# tell the EUS where to find the Data Dictionary and
# your data
#
DICTIONARY=/basis/pro5/bbdict/
DATA=/basis/pro5/data/
#
# Any global strings you want to add to further configure
# the EUS environment, or which are required by your
# application, can be added here. You can access
# these strings within your program with the STBL()
# function.
#
COMPANY=BASIS International Ltd.

Each of the lines beginning with a pound sign "#" character are considered to be comments (future releases may make use of some reserved meta-statements beginning with a pound sign) and are ignored by _acu.utl. The other lines describe entries to be made in the global string area.

A call to _acu.utl using the above configuration creates global strings as though the following STBL() function had been executed:

dummy$=STBL("#?eus",$0A$+"BBSTD"+$0A$+"BBEXT"+
:$0A$+"DICTIONARY"+$0A$+"COMPANY")

#?eus is called a "global string group". Global string groups are lists of global stings. The name of this global string group is made of #? plus the configuration extension.

After CALLing _acu.utl, executing the following sets BBSTD$ to /basis/pro5/std:

BBSTD$=STBL("BBSTD")

A minimal configuration file requires only that the path global strings (BBEXT) and (BBSTD) be included. The EUS programs use these global strings to find other utility programs. Therefore, it is possible to customize applications to use different versions of the BASIS utility programs. But the real advantage of using this configuration scheme lies in the ability to support multiple projects with the same set of programs, either on different computers or in separate directories on the same machine.

To use all of the EUS Toolkit features, additional global string entries should be included in the configuration file to ensure the same environment is used by the application every time. Some of these additional global string entries include: (DICTIONARY), (DATA), (HELP), (HELPFILE), (KEYMAP), (LANGUAGE), (MENUS), (NEWLINE_CHAR), (SECURITY) , (PROJECT), and (ROOT).

The following is a brief description of these additional global strings:

  • The (DICTIONARY) global string defines the location of the BASIS Data Dictionary and should be defined in the configuration file; this global string gives the path to the bbdict directory name. It is possible to have more than one data dictionary in a project or application, and the dictionaries can be changed dynamically at run time by altering the path in the (DICTIONARY) global string.

  • The data dictionary uses the (DATA) global string to determine the location of data files. Though it is not necessary to use this global string, the dictionary's default behavior is to assume it is there. Again, this makes it easy to change data sets dynamically at run time, as well as simplify customization during installation processes.

  • The (HELP) global string tells the EUS programs where help files are located. The (HELPFILE) global string indicates which help file is assumed to be the default if no specific helpfile is named when online help is invoked.

  • The (KEYMAP) global string gives _lkeymap.utl and _ekeymap.utl the location for the keyboard configuration file. This file is used by the Input Subsystem to reinterpret the current keyboard behavior without actually changing the keyboard settings. It is possible to create a separate keymap for each user, so that each user can customize function keys without requiring programming changes to the application.

  • The (LANGUAGE) global string is used by EUS programs to implement multinational versions of programs and files. This global string contains two characters ("am" for American English, "de" for German, "uk" for British English, "es" for Spanish, and so on) and is appended to file names wherever appropriate For example, the value "am" may be appended to a file named defhelp to create defhelp.am. By using the (LANGUAGE) global string, applications do not have to be recoded when ported to new lingual environments.

  • The (MENUS) global string is used to indicate where menu files are located. Refer to the Menu System for additional information.

Some of the EUS programs permit the use of multiline titles and descriptions The (NEWLINE_CHAR) global string can be used to indicate a standard "newline" character. The default is "\", and anywhere this character is documented, it is assumed that the (NEWLINE_CHAR) has been set to this value. This character is also referred to as the "EUS Toolkit newline character."

The (SECURITY) global string is used by the Menu System to control access to menus and programs. Refer to Menu System for additional information.

The (PROJECT) and (ROOT) global strings are used to optimize string table references.