ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 319
SQL Statements A - D
CLOSE
CLOSE
The CLOSE statement is used to close an open cursor.
Scope
Application Programs or Procedures
SQL Syntax
CLOSE
CursorName
[USING {[SQL]DESCRIPTOR {SQLDA
Areaname
}
:
HostVariable
[[INDICATOR]:
Indicator
][,...]}]
Parameters
CursorName
designates the open cursor to be closed.
USING defines where to place return status and output
parameters after closing a dynamic procedure cursor.
HostVariable
identifies a host variable for holding return status and
output parameters after closing a dynamic procedure
cursor. These must be specified in the same order as in the
associated EXECUTE PROCEDURE statement.
Indicator
names the indicator variable, an output host variable
whose value depends on whether the host variable
contains a null value. The following integer values are
svalid:
0 meaning the output parameter's value is not null
1 meaning the output parameter's value is null
>0 meaning the output parameter's value is truncated (for
CHAR, VARCHAR, BINARY, and VARBINARY columns)
DESCRIPTOR defines where to place return status and output
parameters after closing a procedure cursor. Specify the
same location (SQLDA, area name, or host variable) as
you specified in the DESCRIBE OUTPUT statement.
SQLDA specifies that a data structure of sqlda_type named
SQLDA is to be used to pass information about the
prepared statement between the application and
ALLBASE/SQL.
AreaName
specifies the user defined name of a data structure of
sqlda_type that is to be used to pass information about the
prepared statement.