<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.signature.net/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=IB_Statements%2Fkey</id>
		<title>IB Statements/key - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.signature.net/index.php?action=history&amp;feed=atom&amp;title=IB_Statements%2Fkey"/>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/key&amp;action=history"/>
		<updated>2026-04-19T01:59:02Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/key&amp;diff=452&amp;oldid=prev</id>
		<title>Badge: New page: '''KEY function'''   '''Syntax:'''  KEY(lun [,EXCP=statement-label])    '''Discussion:'''  The KEY function returns the value of the next key in the keyed file open on the specified logica...</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/key&amp;diff=452&amp;oldid=prev"/>
				<updated>2009-05-22T12:05:29Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;#39;&amp;#39;&amp;#39;KEY function&amp;#39;&amp;#39;&amp;#39;   &amp;#39;&amp;#39;&amp;#39;Syntax:&amp;#39;&amp;#39;&amp;#39;  KEY(lun [,EXCP=statement-label])    &amp;#39;&amp;#39;&amp;#39;Discussion:&amp;#39;&amp;#39;&amp;#39;  The KEY function returns the value of the next key in the keyed file open on the specified logica...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''KEY function''' &lt;br /&gt;
&lt;br /&gt;
'''Syntax:'''  KEY(lun [,EXCP=statement-label])  &lt;br /&gt;
&lt;br /&gt;
'''Discussion:'''  The KEY function returns the value of the next key in the keyed file open on the specified logical unit number. The next key is the key following the position of the record pointer. (Keys are stored in ASCII order.) &lt;br /&gt;
&lt;br /&gt;
'''Notes:''' &lt;br /&gt;
&lt;br /&gt;
The KEY function is valid only for keyed files. &lt;br /&gt;
&lt;br /&gt;
If the KEY function is attempted on an empty keyed file, an exception 2 (END OF FILE) will be reported. &lt;br /&gt;
&lt;br /&gt;
If the record pointer is currently at the last record in the file, the KEY function will result an exception 2. &lt;br /&gt;
&lt;br /&gt;
The KEY function does not move the record pointer. &lt;br /&gt;
&lt;br /&gt;
Other file-related functions: FIRST, LAST, PREV. &lt;br /&gt;
 &lt;br /&gt;
 Example:  OPEN (1) &amp;quot;SALES&amp;quot;&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 NEXTKEY$ = KEY(1,EXCP=9999)&lt;br /&gt;
&lt;br /&gt;
In the above example, the KEY function is used to determine the value of the next key in the SALES file. The resulting value depends upon the statements between the opening of the file (when the pointer is positioned at the beginning of the file) and the execution of the KEY function.&lt;/div&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	</feed>