Operating Mode

From Br Wiki
Jump to: navigation, search

The operating mode portion of the status line (columns 1-7) contains information about what Business Rules is currently doing. Each of the different operating modes (described below) is identified with a message in this section of the status line.

ATTN

ATTN mode indicates that execution of a program has been interrupted as a result of pressing Ctrl-A. The last character in the 23rd line will be blank while a program is in ATTN mode; it will be restored when the program is resumed. While a program is in ATTN mode, you may execute many Business Rules commands, including LIST and PRINT. To resume execution, type GO.

CHAIN

CHAIN indicates that a program chain (as executed by the CHAIN statement) is in progress. No action is required.

ERROR

ERROR mode indicates that an execution or syntax error has occurred. When this message appears, a number that identifies the type of error appears in the error code field, and the number of the line where the error occurred appears in the line number field.

When a running program enters ERROR mode, execution temporarily stops so that you can both fix the error and continue by typing GO, or end the program (see the END and STOP statements and the CLEAR command for information about ending a program).

It is possible to execute most Business Rules instructions, including LIST (to see the program) and PRINT (to test the value of variables), while a program is in ERROR mode; this capability should aid you in determining the cause of an error.

HELP

HELP indicates that Business Rules is accessing the help facility either because the programmer or operator pressed the <HELP> or F1 key or because a program initiated access with the HELP$ function. See the Help Facility for more information.

If the help files have been installed on your Business Rules system, the help facility may be used to get immediate information about the cause of the error. If the error occurred from a running program, simply press the <HELP> key, and information about the error will appear on the screen. If the error occurred while program lines were being typed into Business Rules press the down arrow once and then press the <HELP> key; information about the error will appear on the screen.

HOLD

HOLD indicates that program execution is on hold because the Esc key was pressed. Business Rules will not accept keyboard input while it is in HOLD status. Pressing Esc again resumes execution.

INPUT

INPUT indicates that the program is waiting for data input as required by an INPUT, LINPUT, RINPUT, INPUT FIELDS or RINPUT FIELDS statement. When the required information is entered and ENTER or a function key is pressed, the program will continue.

INSERT

INSERT indicates that the Ins key has been pressed and INSERT mode is active. In this mode, typed characters insert themselves between existing characters at the position where they are typed. (When INSERT mode is not in effect, typed characters replace the characters, which previously occupied the same position.) To return to the normal keyboard mode, either press INS again or press ENTER.

LOAD

LOAD indicates that Business Rules is loading a program as specified by the LOAD command. No action is required.

PAUSE

PAUSE mode indicates that a program has encountered a PAUSE statement and is waiting for operator action. The last character in the 23rd line will be blank while a program is in PAUSE mode; it will be restored when the program is resumed. To resume execution, type GO.

PR-EDIT

PR-EDIT indicates that a program edit is in process. No action is required.

PROC

PROC indicates that a procedure file is being executed. If the cursor is on the last line of the screen, the procedure has been interrupted; type GO to resume execution.

READY

READY mode indicates that Business Rules is ready and waiting for program statements or a command to be typed in from the keyboard.

REPLACE

REPLACE indicates that the current program is being stored and will replace an existing program, as specified by the REPLACE command. No action is required.

RUN

RUN indicates that a program is being executed, as specified by the RUN command or CHAIN statement. No action is required.

SELECT

SELECT indicates the program is waiting for a menu selection as required by an INPUT SELECT or RINPUT SELECT statement. When the required information is entered and ENTER or a function key is pressed, the program will continue.

SAVE

SAVE indicates that the current program is being stored under a new file name, as specified by the SAVE command. No action is required.

STEP

STEP mode indicates that the program is running in STEP mode, which means that Business Rules stops and waits for you to press ENTER before it executes each program line. STEP mode is designed to make debugging easier, as it allows you to follow the line-by-line action of a program and check the values of variables at different points in the execution.

Each time that Business Rules stops, the number of the line to be executed next is listed in the line number field of the status line. It is possible to execute most Business Rules instructions, including LIST (to see the program) and PRINT (to test the value of variables), while a program is in STEP mode. This capability should help you in determining the cause of an error.
See the RUN or GO commands for information about initiating STEP mode.

SYSERR

SYSERR indicates that a system error has occurred. When this message is displayed, an error code also appears in the error field of the status line.

The error code portion of the status line (column 38- 41) contains a number, which identifies the error code of the most recent error. When an error occurs and the error code number first appears it is displayed in reverse text. As soon as ENTER or an arrow key has been pressed, however, the display changes to normal text.

The error code number will not disappear, even after an error has been corrected and Business Rules has left ERROR mode, until it is replaced with the number of the next error that occurs. If you must clear the status line of the error code number, you can use the CLEAR command (but this will clear other contents of memory, including the current program, as well).