Getting Started

From BR Wiki
Jump to navigation Jump to search

Looking over a description of the Built-In Text Editor can be useful before you begin.

Starting Business Rules - The BR Command

Under DOS and UNIX the BR startup command is simply br, under Windows the command is the name of your particular Business Rules executable file. For instance, if your Business Rules! program is BR32.exe, then you'd type in BR32 to start Business Rules!. This command can be connected to a desktop or folder shortcut.

For more information, see the section on BR32.exe.

Installing Business Rules

The Installation procedures for Business Rules! vary according to the operating system and hardware you will be using. See the Installation instructions that came with your Business Rules system for the appropriate procedure.

Location

The Windows icon Working Directory path specifies where the Windows BR32.EXE file resides. The location of the BR executable file is also the default location of BRCONFIG.SYS. The startup parameters on the Windows icon or the DOS or Unix command line can specify an alternate pathname for BRCONFIG.SYS. Simply begin the config filename with a minus sign. Br interprets it as a config file if it begins with a letter and is not a recognizable parameter.

WBSERVER.DAT
BRCONFIG.SYS can also specify the location of a WBSERVER.DAT file, which is created by BR!, and used for tracking workstation IDs. A BRCONFIG.SYS statement example
WBSERVER F:\\CENTRAL\\

The WBSERVER.DAT file must be common among the various workstations on a network in order for file sharing to work properly. BR produces error 4175 when a file is opened by the second of two workstations that use different WBSERVER.DAT files.

Fonts

In versions 3.8-4.0 BR requires its own font to be installed. This is available in the Other Utilities section of the web site. If you don't install it you may notice horizontal lines, like underlines on your screen, especially when you resize the window. To install a font, go to the Control Panel Font Manager and add the font.

Printer Spool Settings

Windows clients that print to a local printer should go to Start Settings Printers File Properties Details Spool-Settings and set the Spool Data Format (default EMF) to RAW. Otherwise all data spooled through the Windows print manager will be dropped. The print manager can also be bypassed with "SUBSTITUTE PRN:/10 LPT1:".

INSTALLING LEXI

BR programs are much easier and faster to edit if you're using an External Editor, such as MyEditBR, that has Lexi installed. Lexi is a BR lexical pre-processor which allows you to edit programs without line numbers.

Lexi can be installed in MyEditBR with these simple steps:

  1. ) Download LEXI from SageAX.
  2. ) Unzip Lexi.zip into "C:\Lexi". You must use this directory in order for the automatic installation to work.
  3. ) Copy your own brserial.dat file into this directory (C:\Lexi).
  4. ) Launch MyEdit.
  5. ) Select Tools -> Configure User Tools from the menu, and click the Import Tools button. Select the "Lexi.mut" file that came in Lexi.zip.

Installing Lexi in Notepad++.

INSTALL SHIELD CHANGES

After the License Approval, the installation location is confirmed with a browse option and the automatic creation of any missing directories.

If the user selects a new location, it is now properly honored by the installation setup. However, no changes are made to any user provided configuration files. This means YOU ARE RESPONSIBLE TO PROVIDE THE PROPER DRIVE STATEMENTS IN A BRCONFIG.SYS FILE PLACED ON THE INSTALLATION MEDIA prior to installation. These must specify the directories to be used AFTER installation.

To support updating with Install Shield
If a BRConfig.sys file HAS BEEN PROVIDED by the programmer

If a pre-existing BRConfig.sys file is found at the target location, the operator is asked if the new file should replace the existing file. THE DEFAULT ANSWER IS TO RETAIN THE CURRENT FILE. If the operator requests REPLACE then a backup (.BAK) copy is made before installing the new file.

If no pre-existing BRConfig.sys file is found the provided configuration file is installed.

If a BRConfig.sys file IS NOT PROVIDED by the programmer

If a pre-existing BRConfig.sys file is found, no configuration file changes are made by the installation process.

If no pre-existing BRConfig.sys file is found, the installation process creates a BRConfig.sys file consisting of only one drive statement.

Installshield now permits retention of a pre-existing BRConfig.sys file. During installation, the user will be asked if it should be overwritten.

Using Business Rules

Business Rules! must be installed on your system before you can start it.

Once Business Rules! has been installed, you should make sure that the system is accessing the directory within which Business Rules resides.

Business Rules must be started from the host operating system with the br start-up command. Since the Unix and Linux operating systems are case sensitive, the command must be entered in lowercase on these systems. See the above section for details.

Version and Station Number

Information you should have at hand when you call for support
1.) What version of BR are you using: WBVERSION$ or STATUS
2.) What operating system version are you using
3.) What is your workstation id - WSID$
4.) What NetWork are you using
5.) What platform are you using?
6.) Serial number - serial
7.) Session Id - Session$

Status Line

Once you start Business Rules, you will notice that the bottom row contains information about the mode, message area, Error Code, line number, program name, procedure status, BR license serial number, and cursor position by row and column number. See Status Line for details.


Quitting Business Rules

The only proper way to exit Business Rules is with the SYSTEM command. Use of this command returns all control to the operating system. Remember to save all important programs or data before using this command.

The SYSTEM command followed by an executable name can also be used to temporarily "SHELL OUT" to another program and then return to Business Rules.

If BR is in READY mode, you can also exit BR by simply closing the main window.

Comments

In addition to the syntax described by syntax diagrams, Business Rules! commands may include a comment at the end of the command. At least one space and an exclamation point must separate the comment from the rest of the command (!).

Interrupting a Program or Procedure

Procedure files may be interrupted in the same manner as programs, by pressing Ctrl-A. However, one difference is that pressing Ctrl-A causes a procedure file to interrupt and cancel the currently executing command. Typing CLEAR PROC ONLY while a procedure is interrupted will end it; typing GO will cause it to continue executing with the next command in the procedure.

Operating Mode

When you press Ctrl-A, BR will enter ATTN mode. The operating mode portion of the status line (columns 1-7) contains information about what Business Rules is currently doing. For details on each see Operating Mode or the Mode Category.

Program debugging extensions

Display

DISPLAY     variable-name / ALL     [ OFF / PRINT ]  [ >filename ]
Shows the value of 'variable' or all variables, after any changes, plus the line number associated with the change(s), in the format

line-number (that caused the change)   variable-name   new-value

Simply typing the name of the variable into BR will display its current value. Combing this with STEP mode can help the debugging process.

Program Flow

In STEP mode GO indicates GO RUN. Pressing <Enter> indicates GO STEP.

Break variable-name / line / label: [ OFF ]

The BREAK command causes the program to go into step mode when the variable contents are changed or the specified line is encountered. Both "BREAK variable" and "DISPLAY variable" may be active on the same variable concurrently.

DISPLAY and BREAK debug commands work with specific array elements. For example, BREAK CUSTOMER$(6) will cause a program break whenever CUSTOMER$(6) is changed.

1.) Debug data can be redirected to a file.
2.) Debug commands will generate errors 1006 and 1070 instead of ignoring commands with errors.
3.) Debug now displays up to 240 characters of scalar or array element data instead of just 80 characters.


Extended Function Key [Shift F1 - Shift F4] Stepping:

Shift-F1 Step Into Clause - Processes only the next clause.
Shift-F2 Step Over Clause - Processes the next clause plus all routines called by it.
Shift-F3 Step Into Line - Processes up to the next line number encountered.
Shift-F4 Step Over Line - Processes the next line plus all routines called by it.


Note Shift F1 - F4 increases Fkey number as scope of step increases.

Screen Restore

The command RUN STEP NORESTORE suppresses the restoration of the screen after the initial restoration. This enables DOS and Windows models to work like Unix in this regard when stepping through a program.

The command RUN STEP RESTORE causes the application screen to be refreshed before processing each execution step, even in Unix.

GO RUN does not reset the NORESTORE option.


Duplicate Label Checking

Duplicate label checking has been relocated to SAVE/RUN processing. So EDIT will not fail when merging duplicate labels.

Speed improvements have been made when resorting via AIDX.

Configuration

See Config for Beginners for help with your configuration file, BRConfig.sys.


Built-In Text Editor