Stored procedures are created based upon an existing command file. The process of loading the command file into the database as a stored procedure can be performed through the Database Explorer "Stored Procedure" Group Bar menu option, or by using the PUT command.
PUT
A stored procedure can be created in the R:BASE Editor, and then can be loaded into the database as follows:
Options:
argname datatype
The argument name and data type.
comment
An optional comment for the argument or, if placed after RETURN, an optional comment for the entire procedure. The comment must be enclosed in the current QUOTES character.
filename
The filename in ASCII text format, with full path, to load as the stored procedure.
procname
Specifies the procedure name. If a procedure by this name already exists in the database, an error is generated. The procedure name is limited to 128 characters.
RETURN datatype
Data type of the value returned by the procedure.
Note:
•To clear any previous arguments that were stored for a procedure, use the PUT command as follows:
PUT filename AS procname RETURN