Config

From Br Wiki
Jump to: navigation, search

The Config (CON) command causes new configuration file specifications to override those in the BRConfig.Sys file. For a complete list of the CONFIG options set for your current BR session, type STATUS CONFIG from the command line.

See also: Category:Config

Comments and Examples

The command below adds a new entry to the substitution table. All occurrences of the string "COM1:" are to be substituted with the string "/dev/ttyll".

CONFIG SUBSTITUTE COM1:,/dev/ttyll

To delete the above setting, you could use a command such as the following:

CONFIG SUBSTITUTE COM1:,CLEAR

Syntax

As a statement:

00120 EXECUTE "CONFIG <keyword> <spec>"

As a command:

CONFIG <keyword> <spec>

Config.png

Parameters

Each of CONFIG's parameters consists of a BRConfig.sys keyword and a "spec" (specification). The "spec" should consist of the parameters which are described for each keyword in BRConfig.sys.

Keywords currently supported:

3D_FIELDS
APPLICATION_NAME
BASEYEAR
BREAK
CHAINDFLT
COLLATE
COLOR
CONSOLE
CURSOR
DATABASE
DATAHILITE
DECIMAL
DIMONLY
DRIVE
EDITOR
EXECUTE
FIELDBREAK
FIELDHELP
FILENAMES
FONT
FORCE VISIBILITY
GRAPHIC_LINEDRAW
GUI
HELPDFLT
INSERT
KEYBOARD
LOGGING
LOGIN_NAME
MAX_SORT_MEMORY
MAXRECALL
ONQPATH
OPTION
PAGEOFLOW
PICTURE
PrintDir
PRINTSCREEN
RD
S/23-DRIVES
S36MODE
SCREEN
SHELL
SPOOLCMD
STATUSLINE
STYLE
TYPEAHEAD
USERLEVEL
WINDOWS_THEMES
WORKPATH
WSID

Technical Considerations

  1. Although the BRConfig.sys file itself cannot accept keyword abbreviations, the CONFIG command can for its parameters. See Keyword Abbreviation for a list of the shortest allowable abbreviations.
  2. The STATUS SUBSTITUTE command provides a listing of all currently active substitutions specified by CONFIG or the BRConfig.sys SUBSTITUTE specification. (See the STATUS command for more information.)
  3. The use of CONFIG SUBSTITUTE CLEAR clears all substitutions except [WSID] substitutions.
  4. Using CONFIG SCREEN N xx to change the normal attribute of a window will only take effect on windows that are opened after the CONFIG SCREEN specification is executed. Windows already opened are not affected. This applies only to the N (normal) attribute.
  5. Error 1060 now occurs if any CONFIG command exceeds 128 character.
  6. You can re-direct the Ctrl-P (print screen) output to a file or printer of your choice with the CONFIG SUBSTITUTE PRN:/ 10 command. See "SUBSTITUTE" in the BRConfig.sys specification section for more information.
  7. The COM parameter may now be used with the CONFIG command. See "COM" in the BRConfig.sys specification section in this manual for additional information.
  8. The CONFIG command supports the new DIMONLY specification, which can be used to prohibit the creation of new variable names during program entry unless the variables are defined by DIM statements. See DIMONLY in the BRConfig.sys section for more information.
  9. The CONFIG command supports the new PAGEOFLOW specification, which allows you to change the number of printable lines as used by the PAGEOFLOW error condition. If you are still using PAGEOFLOW for page overflow processing in report and listing programs, this option can be used to accommodate paper lengths other than 11 inches. See PAGEOFLOW in the BRConfig.sys section for more information.
  10. The CONFIG command supports the new PRINTSCREEN specification, which identifies how output to the printer and/or to a substitute file for PRN:/10 should be handled when Ctrl-P is pressed.
  11. The CONFIG command supports the BASEYEAR spec, which specifies the starting year of a 100-year window that BR will treat as the default century for the Days function when the century is not otherwise specified. BASEYEAR may also be executed from within a program with the CONFIG BASEYEAR command. The format is as follows, where "number" must be a value from 1900 to 2399. The default is 1900.

For additional information, see the "BASEYEAR" specification in the BRConfig.sys Specification section.

CONFIG BASEYEAR number
  1. The CONFIG command supports the BREAK spec, which can be used to specify the frequency with which BR checks keyboard input for Ctrl-A or function key (ON FNKEY) operations. This will improve execution speed of programs, particularly under Linux. See the "BREAK" specification, in the BRConfig.sys Specification section, for more information.
  2. The CONFIG command supports the DECIMAL spec, which can be used to require operators to enter a decimal point for numeric values, which are formatted to include a fraction. See the "DECIMAL" specification, in the BRConfig.sys Specification section, for more information.
  3. The CONFIG command supports the ATTRIBUTE spec, which can be used to substitute screen attribute combinations in exchange for square-bracketed letters called subattributes. While employing the following example the attribute combination u/rgb:b could be replaced with an [X] in FIELD attribute string at the time of program execution.
CONFIG ATTRIBUTE [X]U/RGB:B

The ATTRIBUTE specification includes the ability to specify the colors that are to be used in the BR help files. Help files need not be changed or edited in order to take advantage of this feature. See "ATTRIBUTE" section in the BRConfig.sys specification section for more information.

Wherever attribute processing occurs (such as in PRINT and INPUT FIELDS statements), BR will accept sub-attributes as long as they have been defined in previous CONFIG commands or in the BRConfig.sys file with the ATTRIBUTE spec.

10 EXECUTE "CONFIG ATTRIBUTE [D]U/RGB:B [A]R/HRGB:R"
20 INPUT FIELDS "1,1,C 10,[D];2,1,C 10,[D]", ATTR "[A]":X$,Y$
Config %env-var%

All CONFIG commands now will accept an environment variable specified in the format %env-var%, where "env-var" is the name of an environment variable that has already been set up at the operating system level. Whenever an environment variable specified in this format is encountered, BR will substitute the contents of the environment variable in the BRConfig.sys specification. If the specified environment variable is not defined at the operating system level, no substitution will occur. (In some cases an error will result, but in others the environment variable format will be accepted as a literal specification.) Access to environment variables will probably be most useful for specifying user-specific information.