A stored procedure is a collection of R:BASE commands and/or SQL statements that are stored in a database.
Stored procedures generally perform the same tasks as Command files, only they are recommended for common repeated tasks. Moving some of the common business and data access logic out of the R:BASE program into the database centralizes functionality in one place, making it accessible to the R:BASE program as well as any third party ODBC applications. Stored procedures offer a powerful way for developers to add value and ease of maintenance to their R:BASE databases and applications.
You can run a stored procedure "manually" using the CALL command, or "automatically" by using database triggers.