Arbutus supports the creation of stored procedures, which allow for repeated or automatic execution of Arbutus commands. Like SQL, the Arbutus language contains English-like commands, but has been enhanced with specific data analysis and manipulation capabilities.
Procedures may be created manually, or graphically, using Analyzer. Arbutus procedures may contain any Arbutus commands, can call other procedures, and may even allow interaction with users.
Automatically Trigger Complex Processes with Procedures
Arbutus procedures may be automatically invoked whenever a particular table is referenced. This capability allows even the most complex processes to be triggered automatically, as required.
Procedures in Detail
- Sub-procedures allow encapsulation of behavior
- Looping allows for iterative processing of data groups
- Variables allow advanced calculations that can contain persistent values
- Grouping allows multiple commands to be executed in one pass of the table
- Flow control allows commands, groups of commands, or sub-procedures to be conditionally executed
- Dialogs allow a run-time user interface to the procedure, to enter parameters or specifications
Example Procedure
Below is an example of a simple procedure that uses a table (Sales) to create a new table (Large_NY) that displays all sales over $10,000 in New York, sorted in descending order of size:
OPEN Sales
SORT ON Sales_Amt D TO Large_NY IF Sales_Amt>10000 AND State=”NY”

.