The Create Procedure Statement
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 which is terminated with a semicolon, you must terminate all statements in the body of the procedure with a semicolon.
The following example shows a create procedure statement that follows the embedded SQL for C (ESQL/C) syntax rules.
Example: Create procedure statement
exec sql
create procedure proc (parm integer) as
declare
var integer;
begin
if parm > 10 then /* Use C comment delimiter*/
message 'C strings can continue (use backslash) \over lines';
insert into tab values (:parm);
endif;
end;
Last modified date: 08/28/2024