The Perform Rule command executes a specified rule. By allowing one rule to call, or perform, another rule, the number of commands that need to be entered can be reduced.
Perform Rule Action – choose from:
Perform Rule – performs the rule that is called exactly once. (All the text boxes except the Rule text box are grayed out.)
Perform While Rule – performs the rule that is called at least one time, and possibly more, based on when the specified condition becomes false. (Information must be entered in all the text boxes.)
Rule – the actual rule that is performed either unconditionally or “while” a specified condition exists. You can type the rule number in the Rule text box, or you can select the up arrow to search for it. If you select the up arrow, the Rule Definitions window displays. On this window, you can select a rule or add a new one.
Left – in the “while” condition can be:
Memory Variable – displays next to the Rule Command window. Double-click a memory variable and the program automatically enters it in the bottom text box below the Left text box.
Record/Field – displays next to the Rule Command window. Double-click a field and the program automatically enters it in the bottom text box below the Left text box.
System Variable – displays next to the Rule Command window. Double-click a system variable and the program automatically enters it in the bottom text box below the Left text box.
Logical operator – specifies the relationship between the Left and Right variables in the “while” condition. Choose from:
EQ – equal to.
NE – not equal to.
GT – greater than.
GE – greater than or equal to.
LT – less than.
LE – less than or equal to.
Right – in the “while” condition can be:
Memory Variable – displays next to the Rule Command window. Double-click a memory variable and the program automatically enters it in the bottom text box below the Right text box.
Record/Field – displays next to the Rule Command window. Double-click a field and the program automatically enters it in the bottom text box below the Right text box.
System Variable – displays next to the Rule Command window. Double-click a system variable and the program automatically enters it in the bottom text box below the Right text box.
Constant – enter a value in the text box on the Constant Value window that displays and select OK. The value is automatically entered in the bottom text box below the Right text box.
Error Condition – choose for the drop-down list of error conditions. (Error conditions are represented internally in the system by 2-digit codes. You can use an If Condition to compare one of these internal error codes to the value in a record field, memory variable, or system variable.) The 2-digit codes and explanations for each error condition are shown below:
Number |
Code |
Explanation |
---|---|---|
No Error |
Normal completion, with no errors detected. |
|
02 |
End of File |
The program reached the end of the file being processed. |
03 |
Duplicate Key |
You are attempting to add a record that already exists. |
04 |
Record Missing |
The requested record was not found. |
05 |
File Full |
The file space allocated has been exhausted. |
06 |
Device Error |
A physical device error has occurred. |
07 |
Open Error |
You are attempting to open a file that is already open or an I/O command was issued before a file was opened. |
08 |
Out of Memory |
There is not enough memory available. |
09 |
File Conflict |
There is a conflict between file attributes. |
10 |
File Missing |
The operating system cannot find a file. |
Other |
An unspecified error condition has occurred. |