ALLBASE/SQL Reference Manual (36216-90216)

Chapter 11 415
SQL Statements E - R
EXECUTE
EXECUTE
The EXECUTE statement causes ALLBASE/SQL to execute a statement that has been
dynamically preprocessed by means of the PREPARE statement.
Scope
ISQL or Application Programs
SQL Syntax
EXECUTE {
StatementName
[
Owner.
]
ModuleName
[(
SectionNumber
) ]}
[USING {[SQL]DESCRIPTOR{[INPUT]{SQLDA
AreaName1
}
[AND OUTPUT{SQLDA
AreaName2
}]
OUTPUT{SQLDA
AreaName
}}
[INPUT]
HostVariableSpecification1
[AND OUTPUT
HostVariableSpecification2
]
OUTPUT
HostVariableSpecification
:Buffer[,:
StartIndex
[,:
NumberOfRows
]] }]
Parameters
StatementName
identifies a dynamically preprocessed statement to be executed in an
application program. The
StatementName
corresponds to one specified in
a previous PREPARE statement. This form of the EXECUTE statement
cannot be used interactively.
[
Owner
.]
ModuleName
[(
SectionNumber
)] identifies a dynamically preprocessed
statement to be executed interactively. The preprocessed statement cannot
be a SELECT statement. This form of the EXECUTE statement cannot be
used in an application program. If the section number is omitted, section
number one is assumed. You can omit the verb EXECUTE interactively.
USING allows dynamic parameter substitution in a prepared statement in an
application program.
[SQL]DESCRIPTOR indicates that a data structure of sqlda_type is used to pass dynamic
parameter information between the application and ALLBASE/SQL.
SQLDA specifies that a data structure of sqlda_type named sqlda is used to pass
dynamic parameter information between the application and
ALLBASE/SQL.
AreaName
specifies the user defined name of a data structure of type sqlda_type that
is used to pass dynamic parameter information between the application
and ALLBASE/SQL.
HostVariableSpecification
specifies host variable(s) that hold dynamic parameter
values at run time. The syntax of
HostVariableSpecification
is