FREE LOCATOR statement
The FREE LOCATOR statement removes the association between a large object locator variable and its value.
This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared.
- LOCATOR variable-name, ...
- Identifies one or more large object locator variables that must be declared
in accordance with the rules for declaring locator variables.
The locator-variable must currently have a locator assigned to it. That is, a locator must have been assigned during this unit of work (by a CALL, FETCH, SELECT INTO, or VALUES INTO statement) and must not subsequently have been freed (by a FREE LOCATOR statement); otherwise, an error is returned (SQLSTATE 0F001).
If more than one locator is specified, all locators that can be freed will be freed, regardless of errors detected in other locators in the list.
EXEC SQL FREE LOCATOR :TKN-VIDEO, :TKN-BUF, :LIFE-STORY-LOCATOR END-EXEC.