The config.bbx Configuration File
For BBj-specific information, see The config.bbx Configuration File – BBj.
PRO/5 uses a configuration file to define detailed system information. The configuration file, normally called config.bbx, is an ASCII text file that is read each time PRO/5 is invoked, and is responsible for setting the number and type of terminals, workstations, and hard disks, as well as other information necessary for the system to run properly. Installing PRO/5 creates a default config.bbx file that can be modified in any ASCII text editor.
Locating the Configuration File
PRO/5 goes through the following steps to locate the configuration file:
-
If the -cpath/file option is used in the command line (see Invoking PRO/5, Command Line Options), PRO/5 will try only path/file.
-
If an environment variable BBCONFIG=path/file exists, PRO/5 will try only path/file.
-
Finally, if neither the -c option nor an environment variable BBCONFIG is set, PRO/5 will try to locate config.bbx in the current directory and then in the /usr/basis/pro5 directory.
Configuration File Components
Configuration file options are organized according to the following
three components:
Limit settings define numeric limits,
such as number of devices, disk files, I/O channels, etc. Data Server
limits cannot exceed those imposed by the host system.
Function settings define operations
functions, such as file search paths, file caching, network access, etc.
Device settings define devices
such as terminals and printers.
Each setting must be contained on a single line and must conform to the standards defined in the following sections, although the order in which the lines are listed in the file is irrelevant. For example, a Function option can be defined before a Limit option.
Limit Settings
The config.bbx file can include one or more of the limit options listed in the following table. Set system limits for the PRO/5 that closely match, but do not exceed those of the host system. Setting the limits too low prevents the host system from being used to its full advantage, while setting limits too high wastes system memory.
Option/Syntax |
Description |
Default |
---|---|---|
PRECISION[=]int |
In PRO/5 version 8.01 and higher, sets default precision. |
2 |
DEVS=int |
Number of aliased devices that can be accessed simultaneously. |
4 |
FCBS=int |
Number of disk files that can be accessed simultaneously. (This is not the total for the system, which may also impose limits for this parameter.) |
10 |
STBLEN=int |
Size, in bytes, of an internal list of ALIAS names and disk names, as well as the memory necessary for storing the config.bbx in memory. The install procedure sets a default size of 4096 bytes. Modifications to this setting must be made in the config.bbx file. The following equation can be used to estimate the required STBLEN size: config.bbx_file_size + (15*number_of_open_files) Therefore, if the config.bbx file is 5000 bytes and the program opens up 100 files simultaneously, the STBLEN should be 5000+(15*100), or 6500. |
4096 |
TIMEOUT=int |
Number of seconds that PRO/5 will wait for a busy record or file before issuing an error. The range is 4 to 32767 seconds. |
10 |
CIBS=int |
Number of I/O channels that can be accessed simultaneously. (This is not the total for the system.) PRO/5 associates an I/O channel with either a file or device. There is not necessarily a one-to-one relationship between CIBS and DEVS or between CIBS and FCBS. For example, 2 channels opened to 2 different devices will require 2 CIBS and 2 DEVS; but 2 channels opened to the same device will require 2 CIBS but only 1 DEV. |
16 |
HANDLES=int |
Maximum number of file handles to be used by each invocation of PRO/5 (not the total for the system). Entering a large number causes the Data Server to retain a large number of open files (FCBCACHE enabled), or allow the user to open a large number of files (FCBCACHE not enabled). PRO/5 cannot allow more HANDLES than the operating system allows. |
OS Limit |
Function Settings
The config.bbx file can include one or more of the function options listed in the following table.
Option/Syntax |
Description |
---|---|
FCBCACHE |
Directs PRO/5 to maintain all files the user opens and closes at the system level during the current session. Files maintained at the system level remain open even after a CLOSE(), enabling them to be reopened very quickly. FCBCACHE caches data files and program files such as those referenced in a CALL. Files closed via the CLOSE() verb but maintained at the system level via FCBCACHE are flushed from the cache when the following operations are performed: BEGIN, END, STOP, PREFIX, CHDIR, RMDIR, and SETDRIVE When a file is cached it cannot be LOCK()ed or opened in an ISZ mode because this attempts to lock the file. Using FCBCACHE can change the behavior of an OPEN() if the filename given is not a fully qualified path and a similarly named file exists in the cache. PRO/5's ability to resolve partially qualified filenames varies by operating system. Note: Setting SETOPTS byte 7, bit $01$ on the WIN32 platform can improve Visual PRO/5's ability to detect duplicate references if the same file is opened via two different names. |
FCBDUPS |
Available in PRO/5 Rev 5.0 and later, this option has no affect unless specifying FCBCACHE. FCBDUPS turns off an FCBCACHE feature that scans the prefix without performing any disk I/O to determine if a file is already in the FCB cache. This allows applications that have files with identical names in multiple directories and are dependent on the PREFIX order to work correctly with FCBCACHE enabled. Example 1:
10
REM This program does not work correctly Example 2:
10
REM This program does not work correctly |
This keyword enables a new, Unix-only console logging feature that writes every command that is entered at the console prompt to the operating system syslog. When the new feature is not used, PRO/5 always writes "pro5[xxxx]: Console logging is not enabled" to the operating system syslog when it displays a console prompt. This is necessary to provide a way to log a console logging disabled security breach event for sites that need it. The LOGCONSOLE feature is the first SoftwareAssetManagement-only feature in PRO/5. Attempting to use it without a SoftwareAssetManagement license will cause PRO/5 to nag for a Software Asset Management (SAM) subscription license |
|
PREFIX path |
Defines the file
search path and search order. Similar to the PATH value for UNIX/XENIX.
Each defined directory must be contained within forward slash
(/) characters. config.bbx
file PREFIX statements, unlike those in the BBx language, are
not contained within quotation marks. The backslash (\) character
is used as an escape to change the meaning of the next character
in this command, and should not be used as a directory delimiter. The directories in the PREFIX are space separated. For example: PREFIX /usr/source/ms/ /usr/bbx/std/ |
SETOPTS hexstring |
Sets special-purpose
features of the BBx filesystem. The SETOPTS configuration line
consists of the keyword SETOPTS followed by a series of hexadecimal
digits (Example: SETOPTS 0010). If no SETOPTS line is entered
in the configuration file, default settings are used. See SETOPTS
verb for the meanings of the codes and the default settings. The syntax for SETOPTS in config.bbx differs from the syntax for the SETOPTS verb in the language. The SETOPTS verb requires the argument to be a hexadecimal value, with a leading and trailing "$" (for example, SETOPTS $0010$). |
SET name="value" |
Sets the STBL() value to name,"value" as if the PRO/5 code, STBL("NAME","VALUE"), were executed. For example: SET STD=/basis/pro5/std/ |
Theme Support
In Visual PRO/5 6.0 and higher
Option/Syntax |
Description |
---|---|
DISABLE_GRID_BORDER_THEME |
Disables the theme border on grids when theme support is turned on. |
DISABLE_GRID_HEADER_THEME |
Disables theme support on grid row and column headers when theme support is turned on. |
DISABLE_GRID_THEME |
Disables theme support on grids entirely when theme support is turned on. |
DISABLE_THEME_SUPPORT |
Disables theme support on the operating system that provides theme support allowing customization of colors and borders on controls. See Controls Overview. |
THEME_TOOL_BUTTON_AS_BUTTON |
Applies the theme element for a button control to all tool button controls. The theme element for a tool button control typically defines the control to have a flat appearance until the user hovers over the control. Setting this keyword in the configuration file causes Visual PRO/5 to use the theme element for a button control when rendering tool buttons, making them immediately identifiable as button controls. |
From Visual PRO/5 6.0 Gives Apps an XP or Vista Contemporary Look and Feel in the BASIS International Advantage:
Visual PRO/5 6.0 solves the theme support problems of past revisions and introduces full-scale theme support.
The first and probably most important feature of Visual PRO/5’s theme support is that it now implements automatically. BASIS developers do not have to change any code or modify any resources. Their applications will magically take on the look and feel of its operating system’s theme.
Device Settings
A device in PRO/5 is defined by a line in the configuration file starting
with the word "ALIAS." An ALIAS describes the PRO/5 device name
and the system device name. Additionally, the ALIAS line may contain information
necessary for PRO/5 to control the device. Several ALIAS lines may appear
in the configuration file. The fields of an ALIAS line are separated by
spaces. Within a field, multiple options may be separated by spaces. If
a field or option contains spaces, it must be delimited by quote ("
") characters.
ALIAS lines have the following form:
aliasbbxname realname type modes
Parameter |
Description |
---|---|
alias |
Identifies the following information as an alias (i.e., bbxname is an alias for realname). |
bbxname |
Refers to the name of the device for PRO/5 to use, e.g., "LP" for a printer, "T0" for a terminal, etc. For TCP/IP and UDP sockets, the bbxname must begin with "N". |
realname |
Refers to the
name of the operating system device, e.g., "/dev/lp"
or "LPT1" for a printer, "/dev/tty01" or doscon
for a terminal. For TCP/IP and UDP sockets, use "tcp"
or "udp", respectively. A realname may also be a file name, i.e., /usr/bbx/bbxout. This is useful if you want to output a PRO/5 graph or printed report to a file for importing to another application, or for later processing. For example, a file containing a plot can be sent to an application that accepts plot files. It may be necessary to modify the termcap file and eliminate the initialization string for the device to remove header data from the resulting file. |
type |
Refers to specific information about the device. For some device types, such as printers, this is simply a comment field. PRO/5 does nothing with the comment. However, it is available for an application to use. For other devices, such as plotters, this indicates the termcap entry for the plotter and is used by PRO/5 to locate the entry in the current termcap file. |
modes |
Tells PRO/5 how
to control a particular device. Some modes are common to all alias
lines, others are very specific to particular devices. In addition
some modes are also operating system dependent. Examples of the
various types of modes are given in the specific device sections
of the documentation. The following modes are common to all ALIAS: EXECON=string EXECOFF=string The strings defined (and typically enclosed in quote characters) are executed on the first output command to the device (EXECON) and at the close of the device (EXECOFF). The commands might be used to load fonts on a device or to initialize the device in some other manner. EXECON and EXECOFF use UNIX parsing methods and any backslashes ("\") in the alias mode must be escaped ("\\") to register as a backslash. lock=path/filename Aliases that share a device should have a lock file. The LOCK statement instructs PRO/5 to create path/filename on the first OPEN of the device. If the path/filename already exists, PRO/5 generates an !ERROR=14 (Busy Device). On the last CLOSE of the device, PRO/5 removes path/filename. This is intended to arbitrate shared device usage on the system. The path/filename parameter is used exactly as it appears in the mode string. No modifications are made to the string. |
All processes sharing a device should use the same lock file. For example, a PRO/5 process using a spooler at the same time that a non-PRO/5 process is using it.
Mode String Substitution
Use mode strings in an ALIAS line or a PRO/5 OPEN statement. A mode
string in an OPEN statement overrides or adds to those in the device ALIAS
line. Mode strings are parsed somewhat differently, depending on whether
they appear on an ALIAS line or in an OPEN statement. Note the following
rules used in parsing the mode string:
A mode string consists of items in the form, <MODENAME>=<value>,
each of which is terminated by a comma (,) or a semi-colon (;). If the
<value>
requires an embedded terminator, such as a comma or semi-colon, it must
be escaped, that is preceded by a backslash (e.g., \,). A backslash may
be included in a <value> by preceding
it by another backslash, i.e., \\.
If a <value>
is in quotes (either single quotes ' or double quotes ") then all
characters between the quotes are considered part of the value. In other
words, terminators within quoted strings need not be escaped. If a quote
character is required within a mode string it should also be escaped (\").
If using a mode string within a PRO/5 program, it must be a PRO/5 string
and, consequently, any quotes appearing within it must be quoted twice.
Be careful of the quotes used within a <value>.
If the device OPENed is a pipe, it invokes a shell to which the quotes
may have a special meaning.
As an example, when downloading a font to a printer before starting a print
job, clear the font when finished. A mode with the proper EXECON and EXECOFF
strings can accomplish this. The download and clear commands have the
following form:
Download |
download -slot 1,1 "courier, 12pt, bld" |
Clear |
clear -slot 1,1 |
As an OPEN statement, it might look like:
OPEN(1,MODE="EXECON=download -slot 1\,1 ""courier,12pt,
bld"",
EXECOFF=clear -slot 1\,1")"LP"
Two double quotes surround the font specification 'courier,12pt, bld'
because this is the only way to include a quote in a PRO/5 string. The
commas between the two 1s at the end of each string are escaped, because
they must appear in the command lines. They are not mode string terminators.
On an ALIAS line the same modes would appear as:
ALIAS LP /dev/lp1 "LASER PRINTER" CR,lock=/usr/spool/uucp/LCL.LP1,EXECON="download
-slot
1,1 \"courier, 12pt, bld\"",EXECOFF="clear -slot 1,1"
The EXECON and EXECOFF mode strings are quoted in this example because
they contain spaces. In this case, the quotes around the font specifier,
"courier, 12pt, bld" are escaped, since these quotes are needed
on the command line. The commas between the two 1s need not be escaped,
since each mode string is a quoted string.
PRO/5 handles four types of devices: terminals, workstations, printers, and plotters. The following sections describe the common elements of printer and plotter devices. Terminal and workstation devices, as well as system dependent information for printer and plotter devices are covered in other topics in this documentation.