Config: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Imported CONFIG command page from old wiki)
 
(format)
Line 1: Line 1:
The '''Config (CON)''' [[command]] causes new configuration file specifications to override those in the [[BRConfig.Sys]] file. For a complete list of applicable CONFIG options, type STATUS CONFIG from the [[command line]].
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]]'''
'''See also:  [[:Category:Config]]'''


====Comments and Examples====
==Comments and Examples==
The following command adds a new entry to the substitution table; all occurrences of the string "COM1:" are to be substituted with the string "/dev/ttyll".
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
  CONFIG SUBSTITUTE COM1:,/dev/ttyll
Line 12: Line 12:
  CONFIG SUBSTITUTE COM1:,CLEAR
  CONFIG SUBSTITUTE COM1:,CLEAR


====Syntax====
==Syntax==
  00120 Execute "config XXXXXX YYYYYYY"
  00120 Execute "config XXXXXX YYYYYYY"
Where XXXXXX is the config keyword and YYYYYYY is the related specification.
Where XXXXXX is the config keyword and YYYYYYY is the related specification.


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


Keywords currently supported:
Keywords currently supported:
Line 67: Line 67:
:[[WSID]]
:[[WSID]]


====Technical Considerations====
==Technical Considerations==


#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.
#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.
# 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.)
# 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.)
# The use of CONFIG SUBSTITUTE CLEAR clears all substitutions except [WSID] substitutions.
# The use of CONFIG SUBSTITUTE CLEAR clears all substitutions except [WSID] substitutions.
# Using CONFIG SCREEN N xx to change the normal attribute of a window will only take affect 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.
# 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.
# Error [[1060]] now results if any CONFIG command exceeds 128 character.
# Error [[1060]] now occurs if any CONFIG command exceeds 128 character.
# 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.
# 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.
# 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.
# 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.
Line 79: Line 79:
# 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.
# 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.
# 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.
# 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.
# The CONFIG command supports the BASEYEAR spec, which specifies the starting year of a 100-year window that Business Rules 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.
# 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.
For additional information, see the "BASEYEAR" specification in the BRConfig.sys Specification section.
Line 85: Line 85:
  CONFIG BASEYEAR number
  CONFIG BASEYEAR number


# The CONFIG command supports the BREAK spec, which can be used to specify the frequency with which Business Rules 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.
# 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.
# 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.
# 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.
# 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.
# 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
  CONFIG ATTRIBUTE [X]U/RGB:B
Whenever attribute processing occurs (such as in PRINT and INPUT FIELD 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.
00010 EXECUTE " CONFIG ATTRIBUTE [D]U/RGB:B [A)R/HRGB:R
00020 INPUT FIELDS "1, 1, C, 10, [D];2,1,C 10,[D]", ATTR "[A]":X$, Y$


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.
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), Business Rules 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.
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"
  10 EXECUTE "CONFIG ATTRIBUTE [D]U/RGB:B [A]R/HRGB:R"
Line 105: Line 100:
  Config %env-var%
  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, Business Rules 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.
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.


====Config Style====
==Config Style==


Business Rules now differentiates between CONFIG STYLE INDENT 0 and CONFIG STYLE INDENT CLEAR. Both specifications previously maintained existing indentation. Now, CONFIG STYLE INDENT 0 does just the opposite: it strips all indentation out of a program when it is saved as source. CONFIG STYLE INDENT CLEAR, which remains as the default, does nothing to alter indentation. It is preserved when saved as source and reloaded.
BR now differentiates between CONFIG STYLE INDENT 0 and CONFIG STYLE INDENT CLEAR. Both specifications previously maintained existing indentation. Now, CONFIG STYLE INDENT 0 does just the opposite: it strips all indentation out of a program when it is saved as source. CONFIG STYLE INDENT CLEAR, which remains as the default, does nothing to alter indentation. It is preserved when saved as source and reloaded.


;Config Statusline
==Config Statusline==


The CONFIG command's STATUSLINE spec now supports the ROWCOL parameter to specify whether or not the current row and column of the cursor is displayed on the right side of the status line. If ROWCOL is on, the information will be displayed in row:column format. If ROWCOL is off, the Business Rules release number will be displayed in the same area. The format of the specification is as follows:
The CONFIG command's STATUSLINE spec now supports the ROWCOL parameter to specify whether or not the current row and column of the cursor is displayed on the right side of the status line. If ROWCOL is on, the information will be displayed in row:column format. If ROWCOL is off, the BR release number will be displayed in the same area. The format of the specification is as follows:


  CONFIG STATUSLINE ROWCOL [ON/OFF]
  CONFIG STATUSLINE ROWCOL [ON/OFF]


====Config Spoolcmd====
==Config Spoolcmd==


The CONFIG command now supports the SPOOLCMD spec, which enables any system spooler to work with Business Rules. See the "SPOOLCMD" specification in the BRConfig.sys Specification section for additional information. On DOS and NetWork versions, OPENs to PRN: will return error 6298 when the following two conditions are true:
The CONFIG command now supports the SPOOLCMD spec, which enables any system spooler to work with BR. See the "SPOOLCMD" specification in the BRConfig.sys Specification section for additional information. On DOS and NetWork versions, OPENs to PRN: will return error 6298 when the following two conditions are true:


:1.) SPOOLCMD is not specified
:1) SPOOLCMD is not specified
:2.) The printer is not ready.
:2) The printer is not ready.


====Config Database====
==Config Database==


In version 4.3 and higher CONFIG DATABASE may use one of 3 methods for connecting to SQL Sources
In version 4.3 and higher CONFIG DATABASE may use one of 3 methods for connecting to SQL Sources

Revision as of 13:34, 20 December 2011

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

00120 Execute "config XXXXXX YYYYYYY"

Where XXXXXX is the config keyword and YYYYYYY is the related specification.

Parameters

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

Keywords currently supported:

3D_FIELDS
APPLICATION_NAME
BASEYEAR
BREAK
CHAINDFLT
COLLATE
COLOR
CONSOLE
CURSOR
DATAHILITE
DECIMAL
DIMONLY
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
S23DRIVES
S36MODE
SCREEN
SHELL
SPOOLCMD
STATUSLINE
STYLE
TYPEAHEAD
USERLEVEL
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.

Config Style

BR now differentiates between CONFIG STYLE INDENT 0 and CONFIG STYLE INDENT CLEAR. Both specifications previously maintained existing indentation. Now, CONFIG STYLE INDENT 0 does just the opposite: it strips all indentation out of a program when it is saved as source. CONFIG STYLE INDENT CLEAR, which remains as the default, does nothing to alter indentation. It is preserved when saved as source and reloaded.

Config Statusline

The CONFIG command's STATUSLINE spec now supports the ROWCOL parameter to specify whether or not the current row and column of the cursor is displayed on the right side of the status line. If ROWCOL is on, the information will be displayed in row:column format. If ROWCOL is off, the BR release number will be displayed in the same area. The format of the specification is as follows:

CONFIG STATUSLINE ROWCOL [ON/OFF]

Config Spoolcmd

The CONFIG command now supports the SPOOLCMD spec, which enables any system spooler to work with BR. See the "SPOOLCMD" specification in the BRConfig.sys Specification section for additional information. On DOS and NetWork versions, OPENs to PRN: will return error 6298 when the following two conditions are true:

1) SPOOLCMD is not specified
2) The printer is not ready.

Config Database

In version 4.3 and higher CONFIG DATABASE may use one of 3 methods for connecting to SQL Sources

  • DSN
  • CONNECTSTRING
  • ODBC-MANAGER