The Create Procedure Statement
As mentioned in the SQL Reference Guide, the create procedure statement has language-specific syntax rules for line continuation, string literal continuation, comments, and the final terminator. These syntax rules follow the rules discussed in this section. For example, the final terminator is a semicolon. Although the preprocessor treats the create procedure statement as a single statement, all statements in the body of the procedure are terminated with a semicolon as is an Embedded SQL/Pascal statement.
The following example shows a create procedure statement that follows the Embedded SQL/Pascal syntax rules:
exec sql
create procedure proc (parm integer) as
declare
var integer;
begin
if parm > 10
then { use pascal comment delimiters }
message 'pascal strings cannot
continue over lines';
insert into tab values (:parm);
endif;
end;
Last modified date: 08/28/2024