ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzmstfreeloc.htm

86 lines
4.9 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow"/>
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="keywords" content="FREE LOCATOR statement, FREE LOCATOR,
SQL statements, locator, in FREE LOCATOR statement, variable" />
<title>FREE LOCATOR</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="freeloc"></a>
<h2 id="freeloc"><a href="rbafzmst02.htm#ToC_1080">FREE LOCATOR</a></h2><a id="idx2610" name="idx2610"></a><a id="idx2611" name="idx2611"></a><a id="idx2612" name="idx2612"></a>
<p>The FREE LOCATOR statement removes the association between a locator variable
and its value.</p>
<a name="wq1511"></a>
<h3 id="wq1511"><a href="rbafzmst02.htm#ToC_1081">Invocation</a></h3>
<p>This statement can only be embedded in an application program. It cannot
be issued interactively. It is an executable statement that can be dynamically
prepared. However, the EXECUTE statement with the USING clause must be used
to execute the prepared statement. FREE LOCATOR cannot be used with the EXECUTE
IMMEDIATE statement. It must not be specified in Java&trade; or REXX.</p>
<a name="wq1512"></a>
<h3 id="wq1512"><a href="rbafzmst02.htm#ToC_1082">Authorization</a></h3>
<p>None required.</p>
<a name="wq1513"></a>
<h3 id="wq1513"><a href="rbafzmst02.htm#ToC_1083">Syntax</a></h3>
<a href="rbafzmstfreeloc.htm#synsfl"><img src="c.gif" alt="Click to skip syntax diagram" /></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn341.htm"
border="0" /></span><a href="#skipsyn-340"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a> .-,--------.
V |
>>-FREE LOCATOR----<span><span class="italic">variable</span></span>-+---------------------------------->&lt;
</pre>
<a name="skipsyn-340" id="skipsyn-340"></a>
<a name="synsfl"></a>
<h3 id="synsfl"><a href="rbafzmst02.htm#ToC_1084">Description</a></h3>
<dl class="parml">
<dt class="bold"><var class="pv">variable,...</var> </dt><a id="idx2613" name="idx2613"></a>
<dd>Identifies one or more locator variables that must be declared in accordance
with the rules for declaring locator variables. The locator variable type
must be a binary large object locator, a character large object locator, or
a double-byte character large object locator.
<p>The <span class="italic">variable</span> 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, assignment statement, SET variable, or VALUES INTO statement) and must
not subsequently have been freed (by a FREE LOCATOR statement); otherwise,
an error is returned.</p>
<p>If more than one locator variable is specified
and an error occurs on one of the locators, no locators will be freed.</p>
</dd>
</dl>
<a name="wq1514"></a>
<h3 id="wq1514"><a href="rbafzmst02.htm#ToC_1085">Example</a></h3>
<p>Assume that the employee table contains columns RESUME, HISTORY, and PICTURE
and that locators have been established in a program to represent the column
values. In a COBOL program, free the CLOB locator variables LOCRES and LOCHIST,
and the BLOB locator variable LOCPIC. </p>
<pre class="xmp"> EXEC SQL
<span class="bold">FREE LOCATOR</span> :LOCRES, :LOCHIST, :LOCPIC
END-EXEC.</pre><a id="idx2614" name="idx2614"></a><a id="idx2615" name="idx2615"></a>
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstfets.htm">Previous Page</a> | <a href="rbafzgetdescr.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>