ASA SQL User's Guide
Using Procedures, Triggers, and Batches
The body of a procedure or trigger consists of a compound statement as discussed in Using compound statements. A compound statement consists of a BEGIN and an END, enclosing a set of SQL statements. Semicolons delimit each statement.
SQL statements allowed in procedures and triggers
Declaring parameters for procedures
Passing parameters to procedures
Passing parameters to functions