The syntax for the prepare statement is:
exec sql [at connection] prepare statement_name from {:host_variable | string};
where:
statement_name is a name up to 30 characters long that identifies the statement. It is a symbolic name or a C character array host variable containing the name of the statements that the precompiler uses to associate an execute statement with a prepare statement.
host_variable is a character array host variable.
Precede the host variable with a colon, as in standard Embedded SQL statements.
string is a literal string that can be used in place of host_variable.
host_variable or string can contain dynamic parameter markers (“?”), which indicate places in the dynamic query where values will be substituted when the statement executes.