<?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%2Fread</id>
		<title>IB Statements/read - 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%2Fread"/>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/read&amp;action=history"/>
		<updated>2026-04-19T00:30:40Z</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/read&amp;diff=758&amp;oldid=prev</id>
		<title>Barb at 22:19, 28 May 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=758&amp;oldid=prev"/>
				<updated>2009-05-28T22:19:22Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:19, 28 May 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''READ statement''' &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''READ statement''' &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Syntax:'''&amp;nbsp; READ (lun, format-statement-label) [KEY=index] [,EXCP=statement-label]&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Syntax:'''&amp;nbsp; READ (lun, format-statement-label) [KEY=index] [,EXCP=statement-label &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;| NOEXCP&lt;/ins&gt;]&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The READ statement inputs a physical record from a keyed or indexed sequential data file into variables within the user program. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Discussion:'''&amp;nbsp; The READ statement inputs a physical record from a keyed or indexed sequential data file into variables within the user program. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:340:newid:758 --&gt;
&lt;/table&gt;</summary>
		<author><name>Barb</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=340&amp;oldid=prev</id>
		<title>Badge at 10:15, 20 May 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=340&amp;oldid=prev"/>
				<updated>2009-05-20T10:15:41Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:15, 20 May 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;::&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;::&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;  &lt;/del&gt;ERROR&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;::&amp;nbsp; &amp;nbsp; &amp;nbsp;  &lt;/ins&gt;ERROR&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this example, a keyed file named CUSTFILE is opened. The user inputs a specific customer number into the variable named CUSTNUM$, and the program reads the data file using this value as an index. If an exception occurs, the program branches to statement label 9999, where the system variable named EXCP is checked for the most probable exceptions (32 is the Comet exception for &amp;quot;KEY NOT FOUND&amp;quot; and 33 is the Comet exception for &amp;quot;RECORD UNAVAILABLE -- EXTRACT ERROR&amp;quot;). If the exception is the result of something other than these two, the program comes to an abnormal end (ERROR).&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this example, a keyed file named CUSTFILE is opened. The user inputs a specific customer number into the variable named CUSTNUM$, and the program reads the data file using this value as an index. If an exception occurs, the program branches to statement label 9999, where the system variable named EXCP is checked for the most probable exceptions (32 is the Comet exception for &amp;quot;KEY NOT FOUND&amp;quot; and 33 is the Comet exception for &amp;quot;RECORD UNAVAILABLE -- EXTRACT ERROR&amp;quot;). If the exception is the result of something other than these two, the program comes to an abnormal end (ERROR).&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:339:newid:340 --&gt;
&lt;/table&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=339&amp;oldid=prev</id>
		<title>Badge at 10:15, 20 May 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=339&amp;oldid=prev"/>
				<updated>2009-05-20T10:15:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:15, 20 May 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;9999&amp;nbsp; &amp;nbsp; IF EXCP=32 THEN PRINT (0) &amp;quot;KEY NOT FOUND&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;9999&amp;nbsp; &amp;nbsp; IF EXCP=32 THEN PRINT (0) &amp;quot;KEY NOT FOUND&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/del&gt;IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;::&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/ins&gt;IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  ERROR&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;  ERROR&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:338:newid:339 --&gt;
&lt;/table&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=338&amp;oldid=prev</id>
		<title>Badge at 10:14, 20 May 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=338&amp;oldid=prev"/>
				<updated>2009-05-20T10:14:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:14, 20 May 2009&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;9999&amp;nbsp; &amp;nbsp; IF EXCP=32 THEN PRINT (0) &amp;quot;KEY NOT FOUND&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;9999&amp;nbsp; &amp;nbsp; IF EXCP=32 THEN PRINT (0) &amp;quot;KEY NOT FOUND&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/del&gt;ERROR&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;  &lt;/ins&gt;ERROR&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this example, a keyed file named CUSTFILE is opened. The user inputs a specific customer number into the variable named CUSTNUM$, and the program reads the data file using this value as an index. If an exception occurs, the program branches to statement label 9999, where the system variable named EXCP is checked for the most probable exceptions (32 is the Comet exception for &amp;quot;KEY NOT FOUND&amp;quot; and 33 is the Comet exception for &amp;quot;RECORD UNAVAILABLE -- EXTRACT ERROR&amp;quot;). If the exception is the result of something other than these two, the program comes to an abnormal end (ERROR).&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this example, a keyed file named CUSTFILE is opened. The user inputs a specific customer number into the variable named CUSTNUM$, and the program reads the data file using this value as an index. If an exception occurs, the program branches to statement label 9999, where the system variable named EXCP is checked for the most probable exceptions (32 is the Comet exception for &amp;quot;KEY NOT FOUND&amp;quot; and 33 is the Comet exception for &amp;quot;RECORD UNAVAILABLE -- EXTRACT ERROR&amp;quot;). If the exception is the result of something other than these two, the program comes to an abnormal end (ERROR).&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:337:newid:338 --&gt;
&lt;/table&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	<entry>
		<id>http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=337&amp;oldid=prev</id>
		<title>Badge: New page: '''READ statement'''   '''Syntax:'''  READ (lun, format-statement-label) [KEY=index] [,EXCP=statement-label]    '''Discussion:'''  The READ statement inputs a physical record from a keyed ...</title>
		<link rel="alternate" type="text/html" href="http://wiki.signature.net/index.php?title=IB_Statements/read&amp;diff=337&amp;oldid=prev"/>
				<updated>2009-05-20T10:13:43Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;#39;&amp;#39;&amp;#39;READ statement&amp;#39;&amp;#39;&amp;#39;   &amp;#39;&amp;#39;&amp;#39;Syntax:&amp;#39;&amp;#39;&amp;#39;  READ (lun, format-statement-label) [KEY=index] [,EXCP=statement-label]    &amp;#39;&amp;#39;&amp;#39;Discussion:&amp;#39;&amp;#39;&amp;#39;  The READ statement inputs a physical record from a keyed ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''READ statement''' &lt;br /&gt;
&lt;br /&gt;
'''Syntax:'''  READ (lun, format-statement-label) [KEY=index] [,EXCP=statement-label]  &lt;br /&gt;
&lt;br /&gt;
'''Discussion:'''  The READ statement inputs a physical record from a keyed or indexed sequential data file into variables within the user program. &lt;br /&gt;
&lt;br /&gt;
The format-statement-label parameter refers to the FORMAT statement that defines the fields in the data record. These fields are listed in record order in the FORMAT statement (see Example 1 below). &lt;br /&gt;
&lt;br /&gt;
Successful execution of a READ statement automatically advances the file pointer to the next available record in key-sequential order. &lt;br /&gt;
&lt;br /&gt;
Reading a keyed file may be done with a string index, a numeric index, or no index. With a string index, Comet will read the data record associated with the supplied key (index) value. With a numeric index, Comet will read the records in record number order without regard for the key tree. With no index, Comet will read the file in key-sequential order. &lt;br /&gt;
&lt;br /&gt;
Reading an indexed sequential file may be done with a numeric index or no index. With a numeric index, Comet will read the record matching the record number position specified. With no index, Comet will read the records in sequential order. &lt;br /&gt;
 &lt;br /&gt;
'''Example 1:'''  1000 FORMAT CUSTNUM$;NAME$;ADDRESS$;CITY$;STATE$;ZIP$&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
OPEN (1) &amp;quot;CUSTFILE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
INPUT (0) CUSTNUM$&lt;br /&gt;
&lt;br /&gt;
IF CUSTNUM$ = &amp;quot;&amp;quot; THEN CLOSE (1) &amp;amp; RUN &amp;quot;QMONITOR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
READ (1,1000) KEY=CUSTNUM$, EXCP=9999&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
9999    IF EXCP=32 THEN PRINT (0) &amp;quot;KEY NOT FOUND&amp;quot; &amp;amp; GOTO 100&lt;br /&gt;
        IF EXCP=33 THEN PRINT (0) &amp;quot;RECORD LOCKED&amp;quot; &amp;amp; GOTO 100&lt;br /&gt;
        ERROR&lt;br /&gt;
&lt;br /&gt;
In this example, a keyed file named CUSTFILE is opened. The user inputs a specific customer number into the variable named CUSTNUM$, and the program reads the data file using this value as an index. If an exception occurs, the program branches to statement label 9999, where the system variable named EXCP is checked for the most probable exceptions (32 is the Comet exception for &amp;quot;KEY NOT FOUND&amp;quot; and 33 is the Comet exception for &amp;quot;RECORD UNAVAILABLE -- EXTRACT ERROR&amp;quot;). If the exception is the result of something other than these two, the program comes to an abnormal end (ERROR).  &lt;br /&gt;
&lt;br /&gt;
'''Example 2:'''  INPUT (0) VALUE&lt;br /&gt;
&lt;br /&gt;
READ (1,1000) KEY=VALUE, EXCP=9999&lt;br /&gt;
&lt;br /&gt;
This example shows how to read a record using a numeric index.  &lt;br /&gt;
&lt;br /&gt;
'''Example 3:'''  READ (1,1000) EXCP=9999&lt;br /&gt;
&lt;br /&gt;
This example shows how to read a record in sequential or key-sequential order.&lt;/div&gt;</summary>
		<author><name>Badge</name></author>	</entry>

	</feed>