ALLBASE/SQL Reference Manual (36216-90216)

416 Chapter11
SQL Statements E - R
EXECUTE
presented separately below.
INPUT is the default for any EXECUTE statement and can be specified, as required,
for any type of prepared statement containing input dynamic parameters.
OUTPUT is only allowed when the prepared statement is an EXECUTE PROCEDURE
statement. It can be used when the statement contains output dynamic
parameters.
INPUT AND OUTPUT is only allowed when the prepared statement is an EXECUTE
PROCEDURE statement. It can be used when the statement contains both
input and output dynamic parameters.
Buffer
is a host variable array structure containing rows that are the input for a
BULK INSERT statement. This structure contains fields for each column to
be inserted and indicator variables for columns that can contain null
values. Whenever a column can contain nulls, an indicator variable must
be included in the array definition immediately after the definition of that
column. This indicator variable is an integer that can have the following
values:
> = 0 the value is not NULL
< 0 the value is NULL
NOTE
To be consistent with standard SQL and to support portability of code, it is
strongly recommended that you use a 1 to indicate a null value. However,
ALLBASE/SQL interprets all negative indicator variable values to mean a
null value.
StartIndex
is a host variable whose value specifies the array subscript denoting where
the first row to be inserted is stored; default is the first element of the
array.
NumberOfRows
is a host variable whose value specifies the number of rows to insert;
default is to insert from the starting index to the end of the array.
SQL Syntax — HostVariableSpecification
:
HostVariableName
[[INDICATOR]:
IndicatorVariable
] [,...]
Parameters — HostVariableSpecification
HostVariableName
specifies a host variable name that at run time contains the data
value that is assigned to a dynamic parameter defined in a prepared
statement.
Host variables must be specified in the same order as the dynamic
parameters in the prepared statement they represent. There must be a
one to one correspondence between host variable names and the dynamic
parameters in the prepared statement. A maximum of 1024 host variable
names can be specified.