<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://m204wiki.rocketsoftware.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rob</id>
	<title>m204wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://m204wiki.rocketsoftware.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rob"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Special:Contributions/Rob"/>
	<updated>2026-05-09T08:25:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=FILEORG_parameter&amp;diff=74930</id>
		<title>FILEORG parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=FILEORG_parameter&amp;diff=74930"/>
		<updated>2015-02-16T00:40:48Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:FILEORG parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;0&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;File&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;During file creation&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V6.1&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;p&amp;gt;The file (&amp;lt;var&amp;gt;[[Table_B_(File_architecture)|Table B]]&amp;lt;/var&amp;gt;) organization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Valid settings of FILEORG are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;Setting&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;200&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Large file support. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Allows files to hold up to 48 M (50,331,648) records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;May not be used in sorted (&amp;lt;code&amp;gt;FILEORG X&#039;01&#039;&amp;lt;/code&amp;gt;) nor hashed (&amp;lt;code&amp;gt;FILEORG X&#039;08&#039;&amp;lt;/code&amp;gt;) files.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Available from Model 204 V7.5.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;100&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Enhanced data handling files. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enables a number of enhancements to the file structure, including support for [[Field group (File architecture)| physical field groups]]; the definition of up to 32000 fields in a file; system maintained [[Field design#Automatic fields|automatic fields]]; [[Field design#Field constraints|field constraints]] providing content validation; and improved space management of fields containing [[Field design#BLOB.2C_CLOB.2C_and_MINLOBE_attributes|large objects]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
FILEORG=X&#039;100&#039; files have a fixed overhead of 4 bytes in &amp;lt;var&amp;gt;[[Table_B_(File_architecture)|table B]]&amp;lt;/var&amp;gt; for each field occurrence as opposed to 3 bytes for FILEORG=X&#039;80&#039; files, 3 bytes for &amp;lt;var&amp;gt;[[Field_design#STRING_attribute|string]]&amp;lt;/var&amp;gt; fields, and 2 bytes for other fields in other files. In addition, FILEORG=X&#039;100&#039; files have a 4-byte overhead per record for a field group ID counter. This overhead is in addition to the space required for the actual values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Some or all of this additional overhead space can be won back when certain FILEORG=X&#039;100&#039; features come into play, such as FLOAT/BINARY field value compression and the use of fieldgroups to eliminate placeholder fields. However, if a file is converted to a FILEORG=X&#039;100&#039; file without taking advantage of fieldgroups, and the file contains no compressible FLOAT/BINARY fields (because there are no such fields, or their values are large and thus uncompressible), then an increase in Table B space requirements is likely.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
FILEORG=X&#039;100&#039; files cannot be loaded via &amp;lt;var&amp;gt;[[FLOD_command|FLOD]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[FILELOAD_command|FILELOAD]]&amp;lt;/var&amp;gt; except with a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Fast/Reload&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Load All Information&amp;lt;/var&amp;gt; (&amp;lt;var&amp;gt;LAI&amp;lt;/var&amp;gt;) FLOD/FILELOAD program.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If FILEORG=X&#039;100&#039; is selected, the X&#039;80&#039; option is automatically set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Available in Model 204 V7.5.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;80&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Optimized field extraction files.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All nonpreallocated (non-OCCURS) fields are preceded by a field-value length byte. With a length byte on every field, even &amp;lt;var&amp;gt;[[Field_design#FLOAT_attribute|FLOAT]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;[[Field_design#CODED_and_NON-CODED_attributes|CODED]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[Field_design#BINARY_attribute|BINARY]]&amp;lt;/var&amp;gt; fields, several instructions and one IF test are eliminated from the internal field scan loop. Having a length byte also allows some simple compression of BINARY, CODED, and FLOAT values. Files created with FILEORG=X&#039;80&#039; cannot be opened in Model 204 version 6.1 or earlier.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This option is automatically set if FILEORG=X&#039;100&#039; is selected.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;40&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;File skewing enabled. &lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt; This option is obsolete and no longer recommended. &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;20&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;[[File_design#Unordered_files_.28X.2720.27.29|Unordered]]&amp;lt;/var&amp;gt; file.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;08&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;[[Hash key files|Hash key file]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;04&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;[[File_design#Reuse_Record_Number_.28X.2740.27.29|Reuse record number (RRN)]]&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;p&amp;gt;This option can be added to any other FILEORG option. If this option is set without the hash key (X&#039;08&#039;) or sorted (X&#039;01&#039;) options, the unordered option (X&#039;20&#039;) is automatically set.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;02&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Sort or hash key required in every record. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This option can be added to the X&#039;08&#039; and X&#039;01&#039; options.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;01&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;[[Sorted files|Sorted file]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;00&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;[[File_design#Entry_order_files|Entry order]]&amp;lt;/var&amp;gt; file. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CREATE parameters]]&lt;br /&gt;
[[Category:File parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=FILEORG_parameter&amp;diff=74929</id>
		<title>FILEORG parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=FILEORG_parameter&amp;diff=74929"/>
		<updated>2015-02-16T00:35:07Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:FILEORG parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;0&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;File&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;During file creation&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V6.1&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;p&amp;gt;The file (&amp;lt;var&amp;gt;[[Table_B_(File_architecture)|Table B]]&amp;lt;/var&amp;gt;) organization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Valid settings of FILEORG are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;Setting&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;200&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Large file support. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Allows files to hold up to 48 M (50331648) records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;May not be used in sorted (&amp;lt;code&amp;gt;FILEORG X&#039;01&#039;&amp;lt;/code&amp;gt;) nor hashed (&amp;lt;code&amp;gt;FILEORG X&#039;08&#039;&amp;lt;/code&amp;gt;) files.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Available from Model 204 V7.5.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;100&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Enhanced data handling files. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enables a number of enhancements to the file structure, including support for [[Field group (File architecture)| physical field groups]]; the definition of up to 32000 fields in a file; system maintained [[Field design#Automatic fields|automatic fields]]; [[Field design#Field constraints|field constraints]] providing content validation; and improved space management of fields containing [[Field design#BLOB.2C_CLOB.2C_and_MINLOBE_attributes|large objects]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
FILEORG=X&#039;100&#039; files have a fixed overhead of 4 bytes in &amp;lt;var&amp;gt;[[Table_B_(File_architecture)|table B]]&amp;lt;/var&amp;gt; for each field occurrence as opposed to 3 bytes for FILEORG=X&#039;80&#039; files, 3 bytes for &amp;lt;var&amp;gt;[[Field_design#STRING_attribute|string]]&amp;lt;/var&amp;gt; fields, and 2 bytes for other fields in other files. In addition, FILEORG=X&#039;100&#039; files have a 4-byte overhead per record for a field group ID counter. This overhead is in addition to the space required for the actual values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Some or all of this additional overhead space can be won back when certain FILEORG=X&#039;100&#039; features come into play, such as FLOAT/BINARY field value compression and the use of fieldgroups to eliminate placeholder fields. However, if a file is converted to a FILEORG=X&#039;100&#039; file without taking advantage of fieldgroups, and the file contains no compressible FLOAT/BINARY fields (because there are no such fields, or their values are large and thus uncompressible), then an increase in Table B space requirements is likely.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
FILEORG=X&#039;100&#039; files cannot be loaded via &amp;lt;var&amp;gt;[[FLOD_command|FLOD]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[FILELOAD_command|FILELOAD]]&amp;lt;/var&amp;gt; except with a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Fast/Reload&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Load All Information&amp;lt;/var&amp;gt; (&amp;lt;var&amp;gt;LAI&amp;lt;/var&amp;gt;) FLOD/FILELOAD program.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If FILEORG=X&#039;100&#039; is selected, the X&#039;80&#039; option is automatically set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Available in Model 204 V7.5.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;80&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Optimized field extraction files.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All nonpreallocated (non-OCCURS) fields are preceded by a field-value length byte. With a length byte on every field, even &amp;lt;var&amp;gt;[[Field_design#FLOAT_attribute|FLOAT]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;[[Field_design#CODED_and_NON-CODED_attributes|CODED]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[Field_design#BINARY_attribute|BINARY]]&amp;lt;/var&amp;gt; fields, several instructions and one IF test are eliminated from the internal field scan loop. Having a length byte also allows some simple compression of BINARY, CODED, and FLOAT values. Files created with FILEORG=X&#039;80&#039; cannot be opened in Model 204 version 6.1 or earlier.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This option is automatically set if FILEORG=X&#039;100&#039; is selected.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;X&#039;40&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;File skewing enabled. &lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt; This option is obsolete and no longer recommended. &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;20&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;[[File_design#Unordered_files_.28X.2720.27.29|Unordered]]&amp;lt;/var&amp;gt; file.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;08&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;[[Hash key files|Hash key file]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;04&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;[[File_design#Reuse_Record_Number_.28X.2740.27.29|Reuse record number (RRN)]]&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;p&amp;gt;This option can be added to any other FILEORG option. If this option is set without the hash key (X&#039;08&#039;) or sorted (X&#039;01&#039;) options, the unordered option (X&#039;20&#039;) is automatically set.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;02&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Sort or hash key required in every record. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This option can be added to the X&#039;08&#039; and X&#039;01&#039; options.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;01&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;[[Sorted files|Sorted file]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt; X&#039;00&#039;&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;[[File_design#Entry_order_files|Entry order]]&amp;lt;/var&amp;gt; file. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CREATE parameters]]&lt;br /&gt;
[[Category:File parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=DELETE_FIELDGROUP_command&amp;diff=73241</id>
		<title>DELETE FIELDGROUP command</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=DELETE_FIELDGROUP_command&amp;diff=73241"/>
		<updated>2014-11-13T01:00:03Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Usage notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Privileges&lt;br /&gt;
&amp;lt;dd&amp;gt;File manager&lt;br /&gt;
&amp;lt;dt&amp;gt;Function&lt;br /&gt;
&amp;lt;dd&amp;gt;Deletes a field group from a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;DELETE FIELDGROUP &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;FieldGroupName&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Where:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;FieldGroupName&amp;lt;/var&amp;gt; is the name of a field group in the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DELETE FIELDGROUP DRIVER  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;p&amp;gt;DELETE FIELDGROUP is available as of Model 204 Version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You must delete all the fields that comprise a field group (except &#039;FG *&#039; fields) before Model 204 can&lt;br /&gt;
delete the specified field group. Otherwise, the folowing message is produced: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2900: CANNOT DELETE FIELDGROUP THAT HAS FIELDS/FIELDGROUPS IN IT&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: File manager commands]]&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_FILEORG_X%27100%27_files_(File_architecture)&amp;diff=60783</id>
		<title>Table E and FILEORG X&#039;100&#039; files (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_FILEORG_X%27100%27_files_(File_architecture)&amp;diff=60783"/>
		<updated>2013-07-05T10:49:01Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Holds Large Object Data (BLOBs and CLOBs) &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
When FILEORG x&#039;100&#039;is set on a file, this is enabled by reorganizing / [[CREATE command: File|CREATE]]ing a file with [[ESIZE parameter|ESIZE]] greater than 0, and then [[DEFINE FIELD command|defining one or more fields]] with an attribute of CLOB or BLOB (the file must have an ESIZE for the latter to occur). &lt;br /&gt;
&lt;br /&gt;
Available as of Model 204 V7.5 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Storage and manipulation of Large Objects (LOBs): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The &#039;chained LOBs&#039; in Table E under [[FILEORG parameter|FILEORG]] x&#039;100&#039; files has a number of advantages over the way LOBs are stored and accessed in non x&#039;100&#039; files.&amp;lt;/p&amp;gt;&lt;br /&gt;
*because the LOBs no longer need to be contiguous, space monitoring is simpler and Table E is less likely to fill up.&lt;br /&gt;
*fields may be defined so that &#039;small&#039; LOBs may be stored &#039;locally&#039; in the record (and so do not use an entire page in Table E). See [[Field Design (File Management)#Using the MINLOBE attribute|the MINLOBE attribute]].  &lt;br /&gt;
*you no longer need to predict (the RESERVE clause) the size that a LOB field may grow to.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Storing Large Objects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a field is defined as a large object (LOB) ([[Field Design (File Management)#BLOB attribute|BLOB]] or [[Field Design (File Management) #CLOB attribute|CLOB attributes]]) a pointer is stored in the record (in Tables B or X), and, depending on the [[Field Design (File Management)#MINLOBE attribute|MINLOBE attribute]] and length of the value being stored, and the LOB value is stored in its proper place, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Pointer in the record ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When you store a &#039;not null&#039; Large Object value in Table E, a Large Object descriptor is stored in Table B (or X depending on where the field is being ADDed). The descriptor contains the length, and a pointer to the Large Object data in the Table E page, and is 27 bytes long.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the same as in non x&#039;100&#039; files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Storing a Large Object ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When the length of the value being stored is 0 (i.e.: a null string) the action taken depends on the &#039;repeating&#039; type ([[Field Design (File Management)#AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes|AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes]]). This is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Other than null strings, if the value being stored is less than or equal to the [[Field Design (File Management)#MINLOBE attribute|MINLOBE attribute]] for the field, then the value is stored directly in the record (Table B or X). Note that this is in addition to the pointer described above.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the length of the value being stored is greater than the [[Field Design (File Management)#MINLOBE attribute|MINLOBE attribute]] for the field, the value is stored in a series of pages in Table E with the first (up to) 6140 bytes (4 bytes being reserved for the chain pointer) on the first page, the next (up to) 6140 bytes on the &#039;next&#039; page, and so on. These pages are not, necessarily, contiguous. Any pages emptied by LOB deletes are first reused, before the pages at [[EHIGHPG parameter|EHIGHPG]] are used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Null Strings and Large Objects ====&lt;br /&gt;
&lt;br /&gt;
Unlike other field types, the [[Field Design (File Management)#STORE-DEFAULT (SD) and STORE-NULL (SN) attributes|STORE-DEFAULT (SD) and STORE-NULL (SN) attributes]] may not be set on LOB fields. This results in such fields having the equivalent to the LITeral option. The following table illustrates the results when null strings are stored in Large Object fields:        &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;;style=&amp;quot;width=&amp;quot;90%&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | Explicit Null &amp;lt;br/&amp;gt; &#039;&#039;fieldname&#039;&#039; = &#039; &#039;&lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | Implicit Null &amp;lt;br/&amp;gt; &#039;&#039;fieldname&#039;&#039; = %X (where %X is null) &lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | No reference in code &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| EXACTLY-ONE&lt;br /&gt;
| (Note 1)  &lt;br /&gt;
| (Note 1)&lt;br /&gt;
| (Note 1)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| AT-MOST-ONE &lt;br /&gt;
| field stored with null value  &lt;br /&gt;
| not present&lt;br /&gt;
| not present&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| REPEATABLE&lt;br /&gt;
| field stored with null value  &lt;br /&gt;
| not present&lt;br /&gt;
| not present&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note 1: the field will always act as if it is physically present (and return a null). However, exactly one fields react a bit differently depending on whether they are inside a Repeating Field Group (RFG) or not. Inside an RFG, all three operations will result in a field being present (as displayed in a PAI). Outside of RFGs, (and remembering that only the CHANGE statement may be used on exactly one fields) only the &#039;CHANGE &#039;&#039;fieldname&#039;&#039; TO %X&#039; syntax will physically create an occurrence on the record.&lt;br /&gt;
&lt;br /&gt;
==The following Parameters and Commands relate to the Use of Table E==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Pages are either used or not in Table E, so there is no formula to determine whether a page is added to the reuse queue (unlike Tables B and X). Because of this, there are no EREUSE, EREUSED, or EQLEN parameters. The size of the reuse queue can always be determined by the difference between EHIGHPG and EPGSUSED.&lt;br /&gt;
{|&lt;br /&gt;
|[[EHIGHPG parameter]]&lt;br /&gt;
|The highest active Table E page. (The first page in Table E is page zero.)&lt;br /&gt;
|-&lt;br /&gt;
|[[EPGSUSED parameter]]&lt;br /&gt;
|The number of Table E pages currently in use.&lt;br /&gt;
|-&lt;br /&gt;
|[[ESIZE parameter]]&lt;br /&gt;
|The number of pages in Table E&lt;br /&gt;
|-&lt;br /&gt;
|[[FILEORG parameter]]&lt;br /&gt;
|The file organization&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_design&amp;diff=60782</id>
		<title>Field design</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_design&amp;diff=60782"/>
		<updated>2013-07-05T10:48:19Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* BLOB, CLOB and MINLOBE attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;The field structures in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are at the heart of providing applications which perform the functions that you require in the most efficient manner possible.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This page discusses exactly how the data structures should be defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Designing records, fieldgroups and fields==&lt;br /&gt;
&amp;lt;p&amp;gt;When setting up a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, you must first decide what fields the records will contain. A record in a personnel file, for instance, might contain a social security number field, a last name field, a spouse&#039;s name field, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Variable record formats===&lt;br /&gt;
&amp;lt;p&amp;gt;The record in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is a very loose concept. Physically, it is simply a collection of fields (data items).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Any field in the [[#Table A (File Architecture) Internal File Dictionary|Table A Dictionary]] may appear in any record in the file. It is quite possible that you create a file with many different logical record types with only a few (or even none) appearing in all of the records.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, each record is not required to have a value for every field; so that record lengths are variable, and it can be argued that the entire concept of a record &#039;format&#039; does not apply to Model 204 files. If an employee&#039;s address is unknown or doesn&#039;t exist in a particular logical record, for example, the address field will be left out of the record altogether. The exception to this is [[#Preallocated fields|Preallocated fields]]. If they are are defined for a file, space is reserved in each record for all such fields, even if they would never exist for that logical record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiply occurring fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Most types of fields can be multiply occurring, that is, have more than one value per record. For example, the CHILD field can appear no times, once, or several times in one record.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Field descriptions and attributes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When you describe a field in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file with the [[DEFINE FIELD command|DEFINE FIELD]] or [[REDEFINE command|REDEFINE FIELD]] commands, you specify a field description that consists of the field name followed by a list of field attributes. These attributes determine how a field may be accessed and how it is stored internally. This section describes the attributes supported for &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Within a record, there is usually no restriction on the number of different fields that can have the same attribute (the exception being the key fields for Sorted and Hash Key files). For example, several fields within the same record can have ORD CHAR indices built for them.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Multiply occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For most field attributes there is almost no restriction on the number of times a particular field can occur within a record. This makes file / record design very flexible. If you have a record which has child details as repeating fields or groups, for example, any number may be supported. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Singly occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few attributes which require a field to have no more than one occurrence per record:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
*NUMERIC RANGE&lt;br /&gt;
*Sort key fields&lt;br /&gt;
*Hash key fields   &lt;br /&gt;
&lt;br /&gt;
and others which require a field to have no more than one occurrence per record or fieldgroup (depending on the context in which they are defined):&lt;br /&gt;
  &lt;br /&gt;
*AT-MOST-ONE&lt;br /&gt;
*EXACTLY-ONE&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Field Design (File Management) Indexing Fields&amp;quot;&amp;gt;Indexing Fields&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Model 204 files can become quite large, and so it is almost always preferable to directly access the record or records which have particular characteristics. As part of your design process, you should have identified which field(s) are likely to be used for direct retrieval of sets of records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you have a personnel file, you are likely to have a unique identifier for each employee, and it is also likely that you will often want to process only the record or records with that ID.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Where retrievals are attempted against non indexed fields, a search of Table B must be done, and the danger of request cancellation because [[MBSCAN parameter|MBSCAN]] is exceeded exists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Model 204 supports a few different ways to implement these direct searches, and the recommended default choice for indexing is the ORDERED attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ORDERED and NON-ORDERED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;Fields used in retrieval specifications should normally be defined as ORDERED (unless one of the other indexing methods, described below) is chosen. NON-ORDERED, the default, means that all retrieval requests need to scan the records directly in Table B to find the selected records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For the architectural approach to the implementation of the ordered index, refer to: [[Table D (File Architecture)#Understanding the Ordered Index|understanding the Ordered Index]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choosing an order type====&lt;br /&gt;
&amp;lt;p&amp;gt;An ORDERED field can have an index with either CHARACTER or NUMERIC ordering. This is called its order type. The field&#039;s order type and updating characteristics are declared with the DEFINE command. You can specify only one order type for a field. ORDERED NUMERIC fields contain numeric values stored as standardized floating-point numbers in one section of the index and non-numeric values in EBCDIC order in another section. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ORDERED CHARACTER fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ORDERED CHARACTER fields use the standard EBCDIC collating sequence. If a field is ORDERED CHARACTER, all values of the field are stored in the Ordered Index in EBCDIC collating sequence order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ORDERED NUMERIC fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A string field value is considered NUMERIC if it consists of digits, with one optional decimal point, and an optional plus or minus sign at the beginning of the string. The value of the number cannot be greater than 10 to the power 75 or less than 10 to the power -75.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If an ORDERED NUMERIC field is also FLOAT, exponential format is allowed. Values for BINARY, FLOAT (8), and FLOAT (16) fields are rounded to 15 significant digits. Values for FLOAT (4) fields are rounded to 6 significant digits. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An invalid value is stored as an unconverted string.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In ORDERED NUMERIC fields, leading zeros are ignored. For example, 001 and 1 are considered equivalent and are maintained in the ORDERED NUMERIC portion of the B-Tree as the same value. For fields that require a meaningful leading zero (such as zip code), use ORDERED CHARACTER.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values of an ORDERED NUMERIC field that do not satisfy the definition of NUMERIC are stored in a separate section of the Ordered Index and processed in EBCDIC order. During FOR EACH VALUE and FOR EACH RECORD IN ORDER BY FIELD processing of an ORDERED NUMERIC field, these values are processed after the valid NUMERIC values unless you restrict the range of values.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Default order types&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is defined as ORDERED without specifying which type of ordering to create, a default order type is used. The default depends on whether the field is STRING, BINARY, or FLOAT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;The default order type is...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BINARY or FLOAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED NUMERIC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ORDERED field definition====&lt;br /&gt;
&amp;lt;p&amp;gt;The ORDERED attribute has options that allow you to determine the type of ordering the Ordered Index is to have, as well as some of the characteristics of the Ordered Index tree as it expands or is rebuilt. These options are described in the discussions of order type and Ordered Index tree structure that follow.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining ORDERED field attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DEFINE command]] is used to specify a field&#039;s attributes. The format of the DEFINE command with the ORDERED attribute options is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; WITH &amp;lt;var&amp;gt;ORD&amp;lt;/var&amp;gt;ERED &lt;br /&gt;
   [&amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt;ACTER | &amp;lt;var&amp;gt;NUM&amp;lt;/var&amp;gt;ERIC][&amp;lt;var&amp;gt;SPL&amp;lt;/var&amp;gt;I&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;PCT &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s&amp;lt;/var&amp;gt;] [IMMED &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;i&amp;lt;/var&amp;gt;] &lt;br /&gt;
   [&amp;lt;var&amp;gt;LRES&amp;lt;/var&amp;gt;ERVE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;r&amp;lt;/var&amp;gt;] [&amp;lt;var&amp;gt;NRES&amp;lt;/var&amp;gt;ERVE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;] &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default designation for a field is NON-ORDERED. Ordered Index tree parameters do not apply for a NON-ORDERED field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;CHARACTER&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;NUMERIC&amp;lt;/var&amp;gt; order types are described above.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;SPLITPCT&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;IMMED&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LRESERVE&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;NRESERVE&amp;lt;/var&amp;gt; parameters are described in [[Table D (File Architecture)#Ordered Index spacing parameters|Ordered Index spacing parameters]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing between ORDERED or NUMERIC RANGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ORDERED attribute has several advantages over the NUMERIC RANGE attribute, and as such should be the normal choice. Specifically:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index allows for multiple occurrences of the same numeric field in a record. The NUMERIC RANGE attribute issues an error message whenever an attempt is made to store more than one occurrence of the same NUMERIC RANGE field in the same record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cost of updating an ORDERED field is lower than that of a NUMERIC RANGE field. The NUMERIC RANGE field requires multiple attributes to be maintained to describe the characteristic of a number. The cost of an update to the Ordered Index is always proportional to the depth of the tree.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In most cases, especially with large numbers, the Ordered Index uses less space to maintain the index information.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index allows for more accurate range requests, with numbers representable by IBM double-word floating-point numbers.   &lt;br /&gt;
&amp;lt;p&amp;gt;Although range retrievals are usually faster for ORDERED fields than for NUMERIC RANGE fields, the size of the range interval and the density of the distribution of values over that range are the principal determining factors. NUMERIC RANGE retrievals are faster for very large ranges with densely distributed data values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Choosing between ORDERED or FRV====&lt;br /&gt;
&amp;lt;p&amp;gt;The ORDERED attribute is usually a better alternative to the FRV attribute. Although FRV fields with small numbers of values may perform faster in value loop processing, they lose this advantage if the found values are required to be in order, and as the number of values increase. FRV ordered retrievals require additional sorting. For retrievals in ascending or descending order, ORDERED fields are more efficient. For (presumably rare) right-adjusted character strings in order, ORDERED fields require additional sorting.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility ORDERED with other field attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following guidelines when specifying the ORDERED attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field cannot be both ORDERED and FRV.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field cannot be both ORDERED NUMERIC and NUMERIC RANGE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field can be both KEY and ORDERED (but serves little or no purpose).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field can be both INVISIBLE and ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field can be both DEFERRABLE and ORDERED. If the field is DEFERRABLE, the index updates can be written out to a (see [[#DEFERRABLE and NON-DEFERRABLE attributes|DEFERRABLE and NON-DEFERRABLE attributes]] for details). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE field must be ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hash and sort key fields and record security fields can be ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fields which are defined as KEY may be converted to ORD with no code changes required (as direct retrievals will work with either type of ORD field).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an architectural view of the ordered index, see [[#Table D (File Architecture) Ordered Index|the Ordered Index]]&lt;br /&gt;
&lt;br /&gt;
===KEY and NON-KEY attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The KEY and NON-KEY attributes govern whether to create a hash index for a field or not. If KEY is specified, an index is created for the field. Retrieval commands will access the index for that field. If NON-KEY is specified, every record in the table is examined. The NON-KEY attribute is a default field description. This section provides information about space and performance for each of these attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;KEY attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When storing fields that have the KEY attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes special entries in the hash index. During retrieval, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; goes directly to the appropriate index entry to find which records satisfy the selection criteria, without searching through other records in the file. This makes retrieval based on KEY fields extremely fast. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;However, these index entries must be updated, when User Language statements or Host Language Interface functions add, change, or delete fields. Processing might take slightly longer for KEY fields than for NON-KEY fields. In addition, the space occupied by the index entries can be considerable, especially in large files and in fields that take on many values.           &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NON-KEY attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;No index entries are maintained in Tables C and D for NON-KEY fields. When a retrieval is performed based on the value of NON-KEY fields, the data in Table B must be searched directly. The direct search can have a significantly adverse effect on performance, if a large number of records must be searched. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;However, the cost of the direct search can be greatly reduced in some cases where both KEY and NON-KEY fields are specified in the retrieval conditions. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reduces the number of records to be searched directly by performing the indexed selection first. Records that are definitely eliminated, based on the KEY conditions, are not searched directly. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing between KEY or NON-KEY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the following guidelines in mind when deciding to designate a field as KEY or NON-KEY:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If space is not an overriding consideration, designate fields that are used frequently for retrievals of equality as KEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a field is updated frequently and only occasionally used for retrieval, define it as NON-KEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a field is used frequently for retrievals and updated frequently, the choice is less obvious. If you reserve sufficient space in Tables C and D for adding inversion entries, the field initially can be defined as NON-KEY and changed later with the [[REDEFINE command]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FOR EACH VALUE (FRV) and NON-FRV attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The FRV attribute is useful when creating fields used in value loop processing. If the FRV attribute is not specified when a field is defined, the NON-FRV attribute is assumed. If this attribute is set, the field is usually assigned the KEY attribute as well.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Table space for FRV fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Every value of an FRV field is automatically encoded in Table A, whether or not the value is stored in Table B (that is, INVISIBLE). In addition to more Table A space, FRV fields require slightly more Table C and Table D space than ordinary key fields. Because of these additional space requirements, the FRV attribute is most frequently defined for fields in which the number of different values does not exceed approximately 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the FRV attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FRV attribute behaves in a special way when combined with the BINARY attribute. This is discussed in [[#BINARY attribute|BINARY attribute]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields cannot be defined with the FRV attribute in [[Field_Attributes#File_model_feature|First-Normal Form (1NF)]] files. &lt;br /&gt;
==== FRV attribute, FRV User Language Statement ====&lt;br /&gt;
&amp;lt;b&amp;gt;Value loops&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User Language provides a special construction called a value loop that executes a set of statements once for each different value of an indicated field. The loop is initiated by the FOR EACH VALUE statement; the field must have the FRV or ORDERED attribute. The FOR EACH VALUE statement has Host Language equivalents in IFFDV and IFGETV. A value loop is illustrated in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;EACH.STATE: &lt;br /&gt;
FOR EACH VALUE OF STATE&lt;br /&gt;
    GET.RECS: &lt;br /&gt;
    FIND ALL RECORDS FOR WHICH&lt;br /&gt;
        STATE = VALUE IN EACH.STATE&lt;br /&gt;
    END FIND&lt;br /&gt;
    TOT.RECS: &lt;br /&gt;
    COUNT RECORDS IN GET.RECS&lt;br /&gt;
    PRINT.CT: &lt;br /&gt;
    PRINT VALUE IN EACH.STATE -&lt;br /&gt;
          WITH COUNT IN TOT.RECS AT COLUMN 20&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;On the first pass through the loop, a value of STATE, such as DELAWARE, is selected. The last statement prints DELAWARE and the number of records with the field-name-equals-value pair: STATE = DELAWARE. On the next pass, another value is chosen, such as IOWA, and so on until all values of the STATE field have been processed exactly once.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the IN ORDER option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The IN ORDER option of the FOR EACH VALUE statement specifies that the values of an FRV KEY field be presented in an ordered sequence-ascending, descending, numerical, right adjusted. This option improves performance by avoiding Online sorts of a large number of records, because only the values are sorted instead of a large found set of records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Value loop processing for ORDERED fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can also use value loop processing on fields with the ORDERED attribute. When the FOR EACH VALUE statement with the IN ORDER option is used for NON-FRV, ORDERED fields, ORDERED retrievals can be significantly faster than FRV ordered retrievals. See [[#ORDERED and NON-ORDERED attributes|ORDERED and NON-ORDERED attributes]] for a description of the ORDERED attribute.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Value loop processing can be made more flexible and efficient by using pattern matching, described in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NUMERIC RANGE and NON-RANGE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;Prior to the introduction of ORDered NUMeric fields, Model 204 permitted range retrieval (a field value numerically equal to, less than, greater than, or between certain values) with the NUMERIC RANGE attribute. This attribute indexes the component parts of a numeric value and then joins them, to provide rapid numeric range retrievals without a direct search of the records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE attribute is not specified when a field is defined, the NON-RANGE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is recommended that, for any new fields being defined,the ORDERED NUMERIC attribute is used in preference to  NUMERIC RANGE.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The NUMERIC RANGE attribute may not be set where the product of [[ASTRPPG parameter|ASTRPPG]] * [[ATRPG parameter|ATRPG]] is greater than 4000 (available in [[FILEORG parameter|FILEORG]] x&#039;100&#039; files).&amp;lt;/p&amp;gt; &lt;br /&gt;
====NUMERIC RANGE retrieval specifications====&lt;br /&gt;
&amp;lt;p&amp;gt;The following retrieval specifications, with their symbolic operator equivalents in parentheses, can be used:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;fieldname IS value&lt;br /&gt;
fieldname IS EQ (=) value&lt;br /&gt;
fieldname IS LESS THAN (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS GREATER THAN (GT or &amp;gt;) value&lt;br /&gt;
fieldname IS BETWEEN (GT or &amp;gt;) value AND (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS GREATER THAN (GT or &amp;gt;) value AND LESS THAN (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS LESS THAN (LT or &amp;amp;lt;) value AND GREATER THAN (GT or &amp;gt;) value &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;The following examples show numeric retrieval specifications:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH AMOUNT IS 53.00&lt;br /&gt;
     DATE IS BETWEEN 050500 AND 050532&lt;br /&gt;
END FIND&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These specifications retrieve records for which AMOUNT has a value of 53.00 (or 53 or 053, and so on) and DATE has a value in May 2005.&amp;lt;/p&amp;gt;&lt;br /&gt;
====NUMERIC RANGE retrieval fields====&lt;br /&gt;
&amp;lt;p&amp;gt;The values of NUMERIC RANGE retrieval fields can be either positive or negative numbers that have as many as ten digits on either side of the decimal point (20 digits maximum). When such fields are stored, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes many entries in Tables C and D as well as some special entries in the field name (attribute) section of [[Table A (File Architecture)|Table A]]. These entries are quite complex, and NUMERIC RANGE retrieval fields require both more storage space and more time to store and update than do KEY fields.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In deciding whether to define a field as NUMERIC RANGE or NON-RANGE (and NON-ORDERED), use the same criteria used in [[#Choosing between KEY or NON-KEY|Choosing between KEY or NON-KEY]], keeping in mind the additional overhead caused by the extra index entries for RANGE fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Interpreting nonnumeric values====&lt;br /&gt;
&amp;lt;p&amp;gt;If a NUMERIC RANGE field is stored with a value that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot interpret as a number, the system stores a special index entry for the record. The field name of this special entry consists of the NUMERIC RANGE retrieval field name with ++ appended. The entry has a value of NON NUMERICAL. Thus, the following User Language retrieval retrieves all records with nonnumerical values of AGE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     AGE++ = NON NUMERICAL&lt;br /&gt;
END FIND &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This can be useful in locating bad input data.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify as many NUMERIC RANGE retrieval fields in each record as you need. However, a particular NUMERIC RANGE retrieval field may not be multiply occurring within any one record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot specify the NUMERIC RANGE attribute in the following circumstances:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;With any field defined as FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For any field in a 1NF file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a chart showing valid and invalid attribute combinations, see [[ Field Attribute Combinations#Combining attributes|Combining attributes]]. If you are defining field attributes with FILEMGMT, you will not be allowed to specify incompatible attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Typing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The following attributes are described individually in the next sections. They represent the way the field is physically stored. Only one of these may be assigned to any field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STRING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BINARY&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BLOB, CLOB, MINLOBE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DATETIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTF-8 or UTF-16&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;VISIBLE, INVISIBLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===STRING attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;STRING is the default attribute for all fields. If your data is character or alphanumeric, such as names and addresses, specify a data type of STRING. STRING fields are also useful if you plan to store mixed data types in an image. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The length of a STRING field is limited to 255 bytes, because the first byte of a STRING data field is a count byte-that is, a byte that contains the length of the rest of the string. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BINARY attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;Fields whose values are numeric integers can alternatively be compressed and stored as 4-byte binary numbers with the BINARY attribute. Specifying BINARY saves Table B space if the average value of the field is from 4-9 digits long.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Acceptable BINARY values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To be compressed successfully, the value must be1-9 digits long and can contain a minus sign. It cannot contain a plus sign, a decimal point, or leading zeros. If the value cannot be compressed, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; refers to the CODED/NON-CODED field attribute (which the BINARY attribute usually overrides) to decide how to store the value.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BINARY and FRV fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BINARY attribute overrides the FRV attribute, except for values that cannot be compressed. If the field cannot be compressed, it will be stored in Table A in either the FEW-VALUED or MANY-VALUED pages depending on the field definition. For instance, AGE has been defined with the BINARY and FRV attributes and takes on the values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23, 04, -34578, 935., 20,&lt;br /&gt;
+8754, and TWO &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement FOR EACH VALUE OF AGE retrieves only the values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;04, 935., +8754 and TWO &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If BINARY is not specified when a field is defined, the STRING attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BINARY fields and NUMERIC VALIDATION files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a BINARY field is defined in a NUMERIC VALIDATION file model file ( [[FILEMODL parameter|FILEMODL]] = x&#039;01&#039; ), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides numeric data type validation. If you try to store non-numeric or other non-conforming (that is, non-compressible) data in a BINARY field in a NUMERIC VALIDATION file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cancels the request with the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2123: VALUE SPECIFIED VIOLATES BINARY DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;BLOB attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;CLOB attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;MINLOBE attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BLOB, CLOB and MINLOBE attributes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The MINLOBE attribute is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BLOB and CLOB attributes describe Large Object data that may be used to store long strings in the database, for example, long XML strings. This means that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language threads can exchange Large Object data with a partner process by way of the Universal Buffer and/or the MQ/204 Interface. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;With the Universal Buffer, Large Object data can be sent and received using User Language READ IMAGE and WRITE IMAGE statements, of $SOCKET READ and WRITE calls.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;With the MQ/204 Interface, Large Object data can be sent and received by MQPUT and MQGET statements, stored and retrieved from the database with User Language STORE, ADD, and assignment statements using the BUFFER reserved area name.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Files created in V6R1.0 and later are not compatible with earlier versions of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;, because of Large Object support and the concomitant changes to the FPL page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Introducing Large Object field types&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Large Object field types includes the following Character Large Object (CLOB) and Binary Large Object (BLOB) attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CLOBs are character strings. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BLOBs are binary strings. No translation is performed when the object is sent or received.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Limitations of Large Object support&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Currently there is a limit of 2,147,483,647 bytes (or two gigabytes) of data per Large Object.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For CLOBs the translation of ASCII to EBCDIC and back is handled by the design of your application.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For BLOBs no translation is performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The User Language INSERT statement is not supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Handling Large Object data&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BLOB and CLOB attributes are supported as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can create, open, and recover a file with a BLOB or CLOB attribute. The Large Object field can be multiply occurring. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DELETE fieldname statement supports the Large Object data. This statement frees the Table B and Table E data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can store and add a Large Object data to the file you have created from the Universal Buffer, BUFFER. Using an assignment statement you can transfer Large Object data from a field into the Universal Buffer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can set the number of Table E pages during file creation with PARAMETER ESIZE= n.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can view the EHIGHPG parameter to determine the highest number of Table E pages in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can modify the size of Table E with an INCREASE or DECREASE command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DELETE FIELD fieldname command supports the Large Object field type, so you can delete a Large Object field name. However, the space in Table B and Table E is not automatically available for reuse. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[$LOBLEN|$LOBLEN]](&amp;lt;i&amp;gt;lob-field-name&amp;lt;/i&amp;gt;) function is available for your use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Dictionary/204 and the Cross-Reference facility support Large Object field types.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;NULL Large Object data is supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Transaction back out is supported for Large Object field types.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field-level security is supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BLOB and CLOB compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Combining BLOB or CLOB with other field attributes, except OCCURS, AT-MOST-ONE, LEVEL, UPDATE IN PLACE, UPDATE AT END, MINLOBE, or UTF-8, is meaningless. Use of any other attributes produces the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;M204.0411: CONFLICTING ATTRIBUTES: ([BLOB | CLOB]) &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;attribute2&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;div id=&amp;quot;Using the MINLOBE attribute&amp;quot;&amp;gt;Using the MINLOBE (MLBE) attribute&amp;lt;/div&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can use the MINLOBE attribute only with a BINARY LARGE OBJECT (BLOB) or a CHARACTER LARGE OBJECT (CLOB) field in a file with FILEORG X&#039;100&#039;. The MINLOBE attribute cannot be paired with the OCCURS attribute. You can redefine the MINLOBE attribute value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;MINLOBE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default and smallest value for MINLOBE is 0, which means that all values of the field are stored in TABLEE. The maximum value of MINLOBE is 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field has the MINLOBE attribute greater than 0:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;And the value of the field is not longer than MINLOBE, then the value is stored in Table B or Table X, instead of Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The User Language CHANGE statement is not allowed and the following error is displayed:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;M204.2869 CHANGE NOT ALLOWED: MINLOBE &amp;gt; 0 FOR FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Any CHARACTER LARGE OBJECT or BINARY LARGE OBJECT field which does not use the CHANGE statement benefits from setting MINLOBE 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESERVE clause is ignored on the User Language ADD statement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing and updating LOBs&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All large object data (LOBs) in a FILEORG=X&#039;100&#039; file are chained. There are four bytes per Table E page overhead for chained LOBs. The pages used by a chained LOB are not contiguous.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Handling LOBs in FILEORG=X&#039;100&#039; files also has the following effects:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESERVE clause is ignored in a LOB field ADD statement processing, as well as the STORE RECORD statement processing of fieldname=value pairs.&lt;br /&gt;
&amp;lt;p&amp;gt;Consequently, the CHANGE statement does not fail because of   insufficient reserved space. If the CHANGE statement requires that a LOB field be extended, it is.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The value of the [[EHIGHPG parameter|EHIGHPG]] parameter is always one less than the high water mark of the number of pages used to hold LOBs. (Unless none were ever added, in which case it is zero, not -1).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The value of the [[EPGSUSED parameter|EPGSUSED]] parameter is always the number of pages currently being used to hold LOBs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The [[COMPACTE command|COMPACTE]] command does not process FILEORG=X&#039;100&#039; files, just as it does not process a file created in V6R1 or earlier. Thus, issuing a COMPACTE command for a FILEORG X&#039;100&#039; file produces an error message.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The [[TABLEE command|TABLEE]] command effectively does a [[VIEW command|VIEW]] ESIZE EHIGHPG EPGSUSED for a FILEORG X&#039;100&#039; file. Consequently there are no TABLEE overhead pages in a FILEORG=x&#039;100&#039; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FLOAT attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;Any field whose values are always, or almost always, numeric might be more efficiently stored in a floating-point representation than in character form. Using FLOAT can also reduce the time spent in data type conversions for fields used frequently in User Language or Host Language Interface computations.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Very large or very small numbers, or numbers with many significant digits, occupy considerably less space in floating-point form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Floating-point fields are fully supported by User Language, the Host Language Interface, and the File Load utility. For more information about storing values in floating-point fields, such as conversion, rounding, and precision rules, see the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 User Language Manual&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FLOAT is not specified when a field is defined, the STRING attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining floating point fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field values are stored in floating-point by specifying the FLOAT attribute in the DEFINE FIELD command and supplying a LENGTH of 4, 8, or 16. The length supplied determines the precision of the floating-point field being defined. For example, to define a long precision field, specify:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; WITH FLOAT LEN 8 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can define three types of floating point fields through the FLOAT and LENGTH attributes.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Type of floating-point field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Occupies...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Holds a maximum of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; maintains a maximum precision of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Short precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4 bytes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; 6 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Long precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8 bytes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Extended precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;16 bytes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;31 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Acceptable values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The floating-point data type uses IBM hardware&#039;s floating-point representation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A value of negative zero (X&#039;800...0&#039;) cannot be stored in a preallocated FLOAT field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FLOAT with NUMERIC VALIDATION files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you define a FLOAT field in a NUMERIC VALIDATION file model file ( [[FILEMODL parameter|FILEMODL]]=x&#039;01&#039; ), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides numeric data type validation. Trying to store non-conforming data in a FLOAT field in a NUMERIC VALIDATION file causes &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to cancel the request with the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2124: VALUE SPECIFIED VIOLATES FLOAT DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;STRING, BINARY, NUMERIC RANGE, and INVISIBLE cannot be specified for a FLOAT field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Storing invalid numeric data: FLOAT or ORDERED NUMERIC===&lt;br /&gt;
&amp;lt;p&amp;gt;The valid range of floating point numbers is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1E-74 through 7.2370E+75&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Model 204 enforces storage rules for floating point numbers outside the valid range:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If 7.2371E75 is stored in a FLOAT field, the value is treated as an invalid floating point number and is stored as a data string &#039;7.2371E75&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;1E-75 is treated as an invalid floating point number and stored as a data string &#039;1E-75&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If an invalid value is stored for a field with the ORDERED NUMERIC attributes, the value stored in the Ordered Index is the data string. That data string is stored on the Invalid Numeric Data portion of the Ordered Index. This changes the output order of these values when the ordering is done against the Ordered Index, for example, when using the User Language IN ORDER BY or FOR EACH VALUE clauses.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DATETIME (DT) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The DATETIME attributes specifies the format of the stored data in Table B, not its function. The other date/time attributes are automatically updated fields generated at the time of record or field group creation or update. A non-automatic field can have a DATETIME format, but all the automatic date/time fields are stored in DATETIME format. The DATETIME attribute requires at least eight significant digits. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define a DATETIME value for a field, you cannot redefine the DATETIME value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UTF-8 and UTF-16 attributes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The UTF-8 and UTF-16 attributes are available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UTF-8 attribute indicates that data is stored in [http://en.wikipedia.org/wiki/UTF-8 UTF-8] format and is treated as [[Unicode|unicode]] data inside SOUL programs. A UTF-8 field can be defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD UTFDATA WITH [UTF-8 | UTF8]&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD UTFBLOB WITH BLOB [UTF-8 | UTF8]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UTF-16 attribute indicates that data is stored in [http://en.wikipedia.org/wiki/UTF-16 UTF-16] format and is treated as [[Unicode|unicode]] data inside SOUL programs. A UTF-16 field can be defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD UTFDATA WITH [UTF-16 | UTF16]&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD UTFBLOB WITH BLOB [UTF-16 | UTF16]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Usage notes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Since UTF-8 or UTF-16 fields behave like unicode variables in SOUL requests printing fields with unicode characters that cannot be converted to displayable EBCDIC results in those characters being [http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_reference_overview character-entity encoded], just as they are encoded when printing unicode variables. This is also true when printing is done via a [[Basic User Language Statements and Commands#PRINT_ALL_INFORMATION_.28or_PAI.29_statement|PAI]] statement. For example, a UTF-8 field containing the unicode value of &amp;quot;I like apple &amp;amp;pi;&amp;quot; would be printed as &amp;quot;I like apple &amp;amp;amp;#x03C0;&amp;quot;. The &amp;amp;amp; symbol is always encoded as &amp;amp;amp;amp; when printed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Just as with unicode variables, assigning an EBCDIC value to a unicode field results in the EBCDIC value being converted to unicode and then to UTF-8 or UTF-16 for storage. Simlarly, assigning a UTF-8 or UTF16 field to an EBCDIC variable results in the UTF-8 or UTF-16 value being converted to unicode and then translated to EBCDIC. In either EBCDIC to unicode or unicode to EBCDIC translation, errors result in request cancellation.&lt;br /&gt;
&amp;lt;li&amp;gt;Unless the preponderance of data stored in UTF-8 or UTF-16 fields has unicode values greater than U+07FF (most likely if most of the data contains Asian language characters), UTF-8 is a better choice for storing unicode data, since UTF-16 requires two bytes for every unicode character while UTF-8 only requires one byte for many common characters and only two bytes for unicode characters up to U+07FF.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTF-8 and UTF-16 fields can be LOB fields or they can be STRING fields (stored in table B).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a UTF-8 or UTF-16 field is defined as an OCCURS field, the length indicates the length in bytes, not the length in characters. Since UTF-8 encoding can use anywhere from one to three bytes to represent a single unicode character in the [http://en.wikipedia.org/wiki/Unicode_plane#Basic_Multilingual_Plane BMP], the only unicode characters supported by SOUL, it can be tricky using UTF-8 fields as OCCURS fields since setting the defined length requires an educated guess about the types of unicode characters that will be store in the field or (probably) oversizing a UTF-8 field to three bytes per character. In the latter case, it would make much more sense to define such a field as UTF-16 as that requires exactly two bytes for each character.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===VISIBLE and INVISIBLE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;In general, you want to be able to retrieve, and then display or print fields, or use the field values in a report. These are fields that you want defined as VISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, however, you have a field that is used only to retrieve records, and space is a consideration, you may want to define the field as INVISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the INVISIBLE attribute is not specified when the field is defined, the VISIBLE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the VISIBLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once an application retrieves a record with a User Language FIND statement or a Host Language IFFIND call, it generally processes one or more fields in User Language PRINT, NOTE, or SORT statements, arithmetic expressions, or Host Language IFGET calls. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CHECK.SALARY: &lt;br /&gt;
IF SALARY GT 1000*AGE&lt;br /&gt;
   THEN PRINT NAME&lt;br /&gt;
END IF &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field referred to by the PRINT statement must have the VISIBLE attribute in its field description. This means that the field-name-equals-value pair is actually stored in the logical record in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the INVISIBLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field that has the INVISIBLE attribute, on the other hand, takes up no storage space in Table B and cannot be printed, noted, or sorted. These fields can be added, deleted, or changed in the logical record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Choosing the INVISIBLE attribute:&amp;lt;/b&amp;gt; In a library catalog file, for example, each record can have an AUTHOR field that contains the author&#039;s full name. In addition, there can be a LAST NAME field that contains only the author&#039;s last name. This creates a convenient index to the catalog and relieves the user of the burden of knowing the entire name when making retrieval requests. Because the author&#039;s last name already is part of the (VISIBLE) AUTHOR field, some space can be saved in Table B by selecting the INVISIBLE attribute for LAST NAME.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because INVISIBLE fields are not stored in Table B, they require special care if the file is ever reorganized. When designing a file, be sure to take reorganization requirements for these fields into consideration. See [[File_Reorganization_and_Table_Compaction#Reorganizing_INVISIBLE_fields|Reorganizing INVISIBLE fields]] for more information.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Maintaining INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;INVISIBLE fields must also have the KEY, NUMERIC RANGE, or ORDERED attribute, and they are normally used only to retrieve records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The User Language FILE RECORDS statement and the Host Language Interface IFFILE function can be used to rapidly add an INVISIBLE KEY field name = value pair to an entire set of records. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL.RECS: FIND ALL RECORDS FOR WHICH&lt;br /&gt;
            NAME = SMITH OR SMYTHE OR SMYTH&lt;br /&gt;
          END FIND&lt;br /&gt;
FILE: FILE RECORDS IN ALL.RECS UNDER HOMONYM = SMYTH &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes entries in Tables C and D to allow retrievals with the specification HOMONYM = SMYTH but does not change Table B. For further information about adding, changing, or deleting INVISIBLE fields, see the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table B considerations&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The values of VISIBLE fields can be stored in the logical record in Table B in one of four formats depending upon the selection of STRING/BINARY, CODED/NON-CODED, or FLOAT field attributes. The choice affects space requirements and, except for a slight increase in the time required for updates and some types of retrievals (see [[#CODED and NON-CODED attributes|CODED and NON-CODED attributes]]), is transparent to the user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The values of fields that have the INVISIBLE attribute are not stored in Table B, and physical storage attributes cannot be specified in their descriptions. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using INVISIBLE fields in 1NF files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The First-Normal form relational model cannot be enforced for INVISIBLE fields. However, INVISIBLE fields are useful within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; for list processing and to support SQL multicolumn keys (see the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SQL Server User&#039;s Guide for more information). Therefore, the INVISIBLE field attribute is allowed, but INVISIBLE fields are not mapped to SQL-accessible columns. The following rules and restrictions apply to INVISIBLE fields in 1NF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because the INVISIBLE and AT-MOST-ONE attribute are incompatible, INVISIBLE fields must be defined as REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot REDEFINE a field as INVISIBLE within a 1NF file; the INVISIBLE and REPEATABLE attributes can be specified only with a DEFINE command. In the case of a record security key field, use the INITIALIZE command to specify the field as INVISIBLE and REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE fields in 1NF files must also be ORDERED or KEY (NUMERIC RANGE is not legal in a 1NF file and results in an error message). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The INVISIBLE attribute cannot be specified for a field defined with the FLOAT or AT-MOST-ONE attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Content ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to the data type (above), there are additional attributes which further control how the data is stored and manipulated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CODED, NON-CODED &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;OCCURS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LENGTH&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PAD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FEW-VALUED, MANY-VALUED &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE IN PLACE, UPDATE AT END&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DEFAULT-VALUE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STORE-DEFAULT, STORE-NULL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AT-MOST-ONE, REPEATABLE and EXACTLY-ONE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DEFERRABLE/NON-DEFERRABLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CODED and NON-CODED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The CODED and NON-CODED attributes let you choose between saving disk space (with CODED) or speeding up update and retrieval time (with NON-CODED). This section discusses how these attributes work.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the CODED attribute is not specified when a field is defined, the NON-CODED attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NON-CODED attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is designated NON-CODED without an OCCURS clause (see the following discussion), its value is stored in Table B as a simple character string that has an additional byte to indicate its length. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;NON-CODED is the best choice for any field whose values have an average length of 1-3 bytes whether or not they are compressible numbers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;CODED attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Choose the CODED option to save Table B space where the values of the field are not suitable for BINARY compression and where their average length is four or more characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When a value that has the CODED attribute is defined, the character string is stored in Table A-the internal file dictionary-and a 4-byte value code pointing to that character string is stored in the logical record in Table B. Space is saved when there are several records that contain the same value. The string is stored only once in Table A, and only the 4-byte code is stored in each of the several records in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing CODED vs. NON-CODED&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The coding and decoding of these value codes takes time, which can slow down updates and retrievals. If speed is important and if disk space is relatively plentiful, do not choose the CODED attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If disk space is somewhat tight, choose the CODED attribute for fields where the values are long and where there are a small number of values relative to the number of records in the file. A STATE field is a prime example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A more precise rule governing the choice of the CODED attribute is difficult to arrive at since first it must be determined (based on the number and length of the field values, and on the number of records) if any disk space is actually saved by the CODED attribute. Then, any space saved must be weighed against the extra time taken by CODED retrievals. And the relative importance of disk space and time are likely to vary with the application as well as with the installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The formulas in [[File size calculation]] show more explicitly the effects of the CODED field attribute on Table A and B size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the $CODE and $DECODE functions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field value encoding is entirely transparent to the user. Data is returned exactly as it was entered. Codes are system-generated, internal codes that have no meaning to a user. If access to both user codes and their translations is needed, use the User Language $CODE and $DECODE functions in the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 User Language Manual&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Any VISIBLE field can be a preallocated field. However, a VISIBLE field that appears a fixed number of times in most of the records in a file is most suited for preallocation in Table B. Preallocated fields, if selected appropriately, require less Table B space than other fields and can be updated and retrieved slightly faster.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocation means that space is reserved in each new record added to a file. As occurrences of preallocated fields are stored in a record, they are placed in the reserved space. Space is used even for occurrences that have not been stored, whereas non-preallocated fields use no space for missing occurrences. Preallocation also imposes restrictions on the number and length of values that can be stored in a record. A field is preallocated if its description includes an OCCURS clause. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[File size calculation]] provides specific rules for the amount of space used by preallocated and non-preallocated fields. Use these rules to determine whether or not to preallocate a particular field.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using an OCCURS clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field is preallocated if its description includes an OCCURS clause. The OCCURS clause indicates the number of occurrences of the field that are preallocated or reserved in each Table B record. From 1 to 255 occurrences can be specified. Any number of values, up to the specified limit, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;, can be stored in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Only as many occurrences as have been stored can be retrieved. Space allocated for unstored values is wasted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If OCCURS is not included in a field description, the field still can occur more than once in a record. Space for the occurrences is not preallocated. There is no limit to the number of values that can be stored for a non-preallocated field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Restrictions for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OCCURS option can be specified only for fields that can be preallocated with a fixed length in Table B. This includes only fields that are defined as CODED, BINARY, or LENGTH &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; (see [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]). If a field is defined as BINARY but does not contain an OCCURS clause, values that cannot be compressed to a binary representation still can be stored in the field. If a field is defined as both BINARY and OCCURS, only compressible values can be stored in it. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not allow incompressible values to be stored in such fields. To avoid such compression problems, include CODED with BINARY and OCCURS in the field description. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Displaying the set of preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DISPLAY RECORD command]] will show all of the preallocated fields in a file. This information is stored on a page in [[Table D (File Architecture)|Table D]] where it is used to create the preallocated field space at the beginning of a record when it is initially stored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot distinguish values padded with X&#039;00&#039; from zero-length values explicitly stored in the file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not allow zero-length values to be explicitly stored in preallocated fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LENGTH and PAD clauses===&lt;br /&gt;
&amp;lt;b&amp;gt;Using the LENGTH clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the LENGTH clause to specify the length of FLOAT fields, as well as NON-CODED preallocated (OCCURS) string fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;LENGTH must be specified for NON-CODED preallocated string fields:&amp;lt;/b&amp;gt; the LENGTH must be included in the description of a NON-CODED preallocated string field to set the maximum length of the field. The length must be in the range 1 through 255. The specified length is preallocated for the number of occurrence specified by the OCCURS clause. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;LENGTH with FLOAT fields:&amp;lt;/b&amp;gt; LENGTH is required with FLOAT to indicate the precision of the floating-point field being defined. The LENGTH options in this instance are 4, 8, or 16. (See [[#FLOAT attribute|FLOAT attribute]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Specifying the LENGTH clause:&amp;lt;/b&amp;gt; The LENGTH clause limits the length of values that can be stored in the field. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not store values that are longer than the specified length. The LENGTH clause does not impose any minimum length. Values that are shorter than the specified length are padded with the PAD character to the maximum length as they are stored in Table B and are returned to their original length as they are retrieved. See the description of padding in [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field occurrences that have been preallocated but not stored contain zero-length values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the PAD clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can include a PAD clause in a field description to select the character that is used to pad field values that are shorter than the length specified in the LENGTH clause (see [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]) for the field. If no PAD character is specified in a field description, the default character, X&#039;00&#039;, is used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Padding characters are invisible to the user and are not included in a retrieved value. Make sure that the padding character does not appear as part of a field value. If it does, incorrect results can occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FEW-VALUED and MANY-VALUED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;If a field that has the CODED or FRV attribute is expected to take on fewer than about 50 different values, choose the FEW-VALUED attribute. Otherwise, define the field as MANY-VALUED. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This option determines whether the value string is stored in the FEW-VALUED or MANY-VALUED section of Table A, and is invalid for fields that are neither CODED nor FRV. Keep the number of values stored in the FEW-VALUED section small to ensure that this section is kept in core during retrieval and update operations. This practice reduces the number of disk accesses and increases retrieval speed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the FEW-VALUED attribute is not specified when a field is defined, the MANY-VALUED attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
===UPDATE IN PLACE and UPDATE AT END attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides the following field attributes that control the way that the value of a field occurrence is changed in Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
If this attribute is specified...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Then a change in the value of a field &lt;br /&gt;
occurrence...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE IN PLACE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Does not change its position relative to other occurrences of the same field in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This attribute is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE AT END&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Is accomplished by deleting the existing occurrence and adding a new one following the others.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing an update option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify either of these options as part of a field description. The UPDATE AT END approach can be useful in certain data aging applications: for example, in applications in which the first occurrence of a field represents the oldest update to the file, and the last occurrence is the most recent update. UPDATE IN PLACE generally is more efficient.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of update option determines the position of a field occurrence within a record only in relation to other occurrences of the same field. The ordering of different fields within a record is determined by a variety of factors, of which the update method is only one. The order of fields within a record normally is not under the control of the file manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User Language update statements other than CHANGE are not affected by the choice of an update option. The ADD and STORE statements always cause values to be added as the last occurrences in a record. The DELETE statement always removes the deleted value while maintaining the relative ordering of the remaining occurrences.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The values of fields that have the INVISIBLE attribute are not stored in Table B, and UPDATE IN PLACE or UPDATE AT END cannot be specified in their descriptions. &amp;lt;/p&amp;gt;&lt;br /&gt;
===DEFAULT-VALUE (DV) attribute===&lt;br /&gt;
The DEFAULT-VALUE attribute is available as of Model 204 version 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;A field defined with a DEFAULT-VALUE (DV) attribute value must also be defined with the EXACTLY-ONE or the AT-MOST-ONE attribute. It specifies the value of the field if the value is not explicitly added in the STORE RECORD, ADD FIELDGROUP, or INSERT FIELDGROUP initial data block. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of the STORE-DEFAULT setting determines whether the DEFAULT-VALUE is physically stored on the record or if it is just used as the default value when the field is missing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFAULT-VALUE attribute allows values up to 31 bytes. An attempt to use more results in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2851: DEFAULT-VALUE VALUE&lt;br /&gt;
&#039;1234567890123456789012345678901234567890&#039; TOO BIG, -&lt;br /&gt;
MUST BE &amp;amp;lt;32 BYTES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of DEFAULT-VALUE is not constrained by attributes such as LEQ, LLE, and LGE. &lt;br /&gt;
&lt;br /&gt;
For example, the entire default value is returned for a field that has been added, even if it exceeds the LEQ setting.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STORE-DEFAULT (SD) and STORE-NULL (SN) attributes===&lt;br /&gt;
The STORE-DEFAULT and STORE-NULL attributes are available as of Model 204 version 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;You can redefine the STORE-DEFAULT and/or STORE-NULL attribute values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The STORE-DEFAULT and STORE-NULL attributes offer these options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LITERAL (the default)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;NONE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ALL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Consider the following example that shows how a DEFAULT-VALUE is handled when the field is defined with the different STORE-DEFAULT types of ALL, NONE, and LITERAL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Here we are defining field NAME_SD_NONE with the STORE-DEFAULT option of NONE, field NAME_SD_LIT with the STORE-DEFAULT option of LITERAL and field NAME_SD_ALL with the STORE-DEFAULT option of ALL. The DEFAULT-VALUE for all of the fields is &#039;NONAME&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this example, the fields belong to a field group but the STORE-DEFAULT (and STORE-NULL) attribute can also be assigned to a field that is not part of a field group. The only requirement is that the field may not be defined as REPEATABLE, that is, it must be either AT-MOST-ONE or EXACTLY-ONE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP X&lt;br /&gt;
  DEFINE FIELD NAME_SD_NONE   WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT NONE DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD NAME_SD_LIT    WITH FIELDGROUP X AND -&lt;br /&gt;
                            ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT LITERAL DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD NAME_SD_ALL    WITH FIELDGROUP X AND -&lt;br /&gt;
                            ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT ALL     DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are basically two ways to store a field in a record. It can be stored: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;- using a literal:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STORE RECORD&lt;br /&gt;
   FIELD.A = &#039;ABC&#039;&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;- or by using a variable:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = &#039;ABC&#039;&lt;br /&gt;
STORE RECORD&lt;br /&gt;
   FIELD.A = %X&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additionally, a field may simply be missing (in the following example, the record has a FIELD.B but FIELD.A is missing):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STORE RECORD&lt;br /&gt;
   FIELD.B = &#039;XXX&#039;&lt;br /&gt;
END STORE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The STORE-DEFAULT options determines how the field will be physically stored if the DEFAULT-VALUE is stored in the field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This example shows what is physically stored in the record when the DEFAULT-VALUE is stored for each of these fields. The DEFAULT-VALUE in this case is &#039;NONAME&#039;. First, we will add the actual DEFAULT-VALUE of &#039;NONAME&#039; by using a variable, then by using the literal &#039;NONAME,&#039; and finally we will add a field group occurrence where the field is missing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD.X: SUBROUTINE&lt;br /&gt;
   IN FILEX  FRN %CURREC&lt;br /&gt;
      * add first field group occurrence using the -variable %NAME:&lt;br /&gt;
      %NAME=&#039;NONAME&#039;&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SD_NONE = %NAME&lt;br /&gt;
          NAME_SD_LIT  = %NAME&lt;br /&gt;
          NAME_SD_ALL  = %NAME&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add second field group occurrence using the - literal &#039;NONAME&#039;:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SD_NONE = &#039;NONAME&#039;&lt;br /&gt;
          NAME_SD_LIT  = &#039;NONAME&#039;&lt;br /&gt;
          NAME_SD_ALL  = &#039;NONAME&#039;&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add third occurrence of the field group with all -&lt;br /&gt;
 values missing:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          * none of these fields added to this occurrence&lt;br /&gt;
      END ADD&lt;br /&gt;
   END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Subsequent PAI of the field group shows what is physically stored on the record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;The field defined with... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;is...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT NONE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Never stored on the record. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT ALL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Always stored on the record. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT LITERAL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Not stored in the first occurrence, because a %variable was used. It was stored in the second occurrence, because the field was added using a literal string.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;\X = 1&lt;br /&gt;
 NAME_SD_ALL = NONAME&lt;br /&gt;
/X = 1&lt;br /&gt;
\X = 2&lt;br /&gt;
 NAME_SD_LIT = NONAME&lt;br /&gt;
 NAME_SD_ALL = NONAME&lt;br /&gt;
/X = 2&lt;br /&gt;
\X = 3&lt;br /&gt;
/X = 3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note that when the record above is printed the DEFAULT-VALUE is printed regardless of whether the field is physically stored on the record or not. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FR&lt;br /&gt;
   PRINT &#039;# NAME_SD_NONE:  NAME_SD_LIT:  NAME_SD_ALL:&#039;&lt;br /&gt;
FEO:&lt;br /&gt;
   FEO FIELDGROUP X&lt;br /&gt;
      PRINT OCCURRENCE IN FEO AND NAME_SD_NONE AND -&lt;br /&gt;
 NAME_SD_LIT AT 16 AND NAME_SD_ALL AT 30&lt;br /&gt;
   END FOR&lt;br /&gt;
END FOR&lt;br /&gt;
&lt;br /&gt;
NAME_SD_NONE:  NAME_SD_LIT:  NAME_SD_ALL:&lt;br /&gt;
NONAME         NONAME        NONAME&lt;br /&gt;
NONAME         NONAME        NONAME&lt;br /&gt;
NONAME         NONAME        NONAME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The same behavior occurs whether the field is AT-MOST-ONE or EXACTLY-ONE. However, a PAI of an EXACTLY-ONE field always shows a value. The actual physical storage on the record is the same.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The options on the STORE-NULL attribute react similarly. When the fields are defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP X&lt;br /&gt;
  DEFINE FIELD NAME_SN_NONE   WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL NONE&lt;br /&gt;
  DEFINE FIELD NAME_SN_LIT    WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL LITERAL&lt;br /&gt;
  DEFINE FIELD NAME_SN_ALL    WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL ALL  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And code used to store the field groups is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;   IN FILEX  FRN %CURREC&lt;br /&gt;
      * add first occurrence using the variable %NAME:&lt;br /&gt;
      %NAME=&#039;&#039;&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SN_NONE = %NAME&lt;br /&gt;
          NAME_SN_LIT  = %NAME&lt;br /&gt;
          NAME_SN_ALL  = %NAME&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add second occurrence using the literal &#039;&#039;:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SN_NONE = &#039;&#039;&lt;br /&gt;
          NAME_SN_LIT  = &#039;&#039;&lt;br /&gt;
          NAME_SN_ALL  = &#039;&#039;&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add third occurrence with missing values:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
      END ADD&lt;br /&gt;
   END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The resulting PAI appears as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;\X = 1&lt;br /&gt;
 NAME_SN_ALL =&lt;br /&gt;
/X = 1&lt;br /&gt;
\X = 2&lt;br /&gt;
 NAME_SN_LIT =&lt;br /&gt;
 NAME_SN_ALL =&lt;br /&gt;
/X = 2&lt;br /&gt;
\X = 3&lt;br /&gt;
/X = 3&lt;br /&gt;
&lt;br /&gt;
BEGIN&lt;br /&gt;
FR&lt;br /&gt;
   PRINT &#039;# NAME_SN_NONE:  NAME_SN_LIT:  NAME_SN_ALL:&#039;&lt;br /&gt;
FEO:&lt;br /&gt;
      FEO FIELDGROUP X&lt;br /&gt;
         PRINT OCCURRENCE IN FEO AND -&lt;br /&gt;
               NAME_SN_NONE AND NAME_SN_LIT AT 16 -&lt;br /&gt;
AND NAME_SN_ALL AT 30&lt;br /&gt;
      END FOR&lt;br /&gt;
   END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Results in the following: nulls are shown for each field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;# NAME_SN_NONE:  NAME_SN_LIT:  NAME_SN_ALL:&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;You can use the AT-MOST-ONE, REPEATABLE, and EXACTLY-ONE attributes, which are mutually exclusive, to define an individual field or a field that is part of a field group definition. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The EXACTLY-ONE attribute is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Using the AT-MOST-ONE attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;The AT-MOST-ONE attribute allows you to ensure that there is only one occurrence of a field in any record, without preallocating space for the field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, the AT-MOST-ONE attribute is required for fields in First-Normal Form (1NF) files. AT-MOST-ONE and REPEATABLE fields in 1NF files are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In non-1NF files, if the AT-MOST-ONE attribute is not specified when a field is defined, the REPEATABLE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is defined with the AT-MOST-ONE attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; prevents multiple occurrences of that field in any given record. The AT-MOST-ONE attribute is useful if, for example, you know that there will be one variable-length field per record, or if you have a field that is often left blank but does not have more than one value per record (such as SPOUSE NAME). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike fields with the OCCURS attribute, AT-MOST-ONE fields are not specifically preallocated. The AT-MOST-ONE attribute lets you store these kinds of records without wasting the space required by OCCURS.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the REPEATABLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is not defined as AT-MOST-ONE, then it is REPEATABLE. Fields with the REPEATABLE attribute can accept multiple occurrences of the field in the record. Unlike the OCCURS attribute, REPEATABLE does not preallocate fields, nor does REPEATABLE let you specify the number of occurrences of the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Using the EXACTLY-ONE (EXONE) attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;As the name suggests an EXACTLY-ONE attribute in a field definition means that the field always has exactly one occurrence in its record or field group context after the initial data block for the record or field group (STORE RECORD, ADD FIELDGROUP, or INSERT FIELDGROUP). If no explicit value is stored for the field, its value has either the DEFAULT-VALUE for the field or the null string (&#039; &#039;), if no DEFAULT-VALUE was specified for the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot add, insert, or delete an EXACTLY-ONE field, although you can change an EXACTLY-ONE field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The EXACTLY-ONE attribute is not allowed when both the DEFAULT-VALUE and STORE-NULL NONE attributes are specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
====EXACTLY-ONE fields with a field group====&lt;br /&gt;
&amp;lt;p&amp;gt;The EXACTLY-ONE attribute for a field within a field group means that the field can occur only once inside a single field group occurrence. However, since field groups can occur multiple times in a field group record, an EXACTLY-ONE field inside a field group can occur multiple times inside a field group record. &amp;lt;/p&amp;gt;&lt;br /&gt;
====Defaults for AT-MOST-ONE, REPEATABLE and EXACTLY- ONE fields====&lt;br /&gt;
&amp;lt;p&amp;gt;REPEATABLE is the default except for 1NF files, where AT-MOST-ONE is required on all fields, except INVISIBLE. See [[#VISIBLE and INVISIBLE attributes|VISIBLE and INVISIBLE attributes]] for information. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The AT-MOST-ONE attribute is required on all fields in a 1NF file because multiply occurring fields violate relational First-Normal Form. The one exception to this rule is for INVISIBLE/REPEATABLE fields in 1NF files. See [[Field_Design_(File_Management)#AT-MOST-ONE_in_First_Normal_Form_.281NF.29_files|AT-MOST-ONE in First Normal Form files]] for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The EXACTLY-ONE attribute is the default frequency of occurrence for a field defined within a field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Enforcing AT-MOST-ONE constraints====&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that AT-MOST-ONE field constraints are not violated for the following User Language requests and the Host Language and FLOD counterparts: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ADD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INSERT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STORE RECORD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before the indexes are updated and a new field is added or inserted into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record, all existing fields in the record are checked to ensure that the new field does not create a second occurrence: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a new field violates the AT-MOST-ONE rules, and there is no ON FCC unit, the request is canceled with the following error message:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; validates a field if you REDEFINE it to be AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a violation occurs and there is an ON FCC unit, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; processes the ON unit. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the Host Language Interface, the 202 return code is passed back to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;; in FLOD, the file is marked logically inconsistent. However, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not cancel the request in either case. &amp;lt;/p&amp;gt;&lt;br /&gt;
====AT-MOST-ONE and transaction back out files====&lt;br /&gt;
&amp;lt;p&amp;gt;Transaction back out must be active for files when defining AT-MOST-ONE fields. If you try to define an AT-MOST-ONE field in a non-TBO file, the DEFINE fails and you receive an error message. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the field is defined, you can turn Transaction back out off in non-1NF files. However, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support strongly recommends that you keep Transaction back out set in files containing fields that can cause constraint conflicts (currently AT-MOST-ONE and UNIQUE). If you turn Transaction back out off in a file with an AT-MOST-ONE or UNIQUE field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sends you a warning message and a &amp;quot;Do You Really Want To?&amp;quot; prompt.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Using FLOD or FILELOAD with AT-MOST-ONE fields====&lt;br /&gt;
&amp;lt;p&amp;gt;When you use FLOD or FILELOAD to load or modify records that have AT-MOST-ONE fields, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that the new or modified records do not violate AT-MOST-ONE constraints. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; detects and reports all violations of AT-MOST-ONE in one pass of the input data. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; finds any fields that violate the constraints, the following occurs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The error is reported and the new or duplicate field is rejected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FLOD continues processing the input data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;At the end of the run, the file is marked &amp;quot;logically inconsistent;&amp;quot; that is, the FISTAT parameter is set to X&#039;40&#039;. See &amp;lt;b&amp;gt;See Logically inconsistent files&amp;lt;/b&amp;gt; for more information.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The following error message is issued for each violation:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====AT-MOST-ONE in First Normal Form (1NF) files====&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Using OCCURS 1 in 1NF files:&amp;lt;/b&amp;gt; For 1NF files, where AT-MOST-ONE is required, use OCCURS 1 to save processing time if you are storing a large number of records in which the field is always exactly the same length (such as a Social Security Number). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;INVISIBLE fields in 1NF files:&amp;lt;/b&amp;gt; The First-Normal form relational model cannot be enforced for INVISIBLE fields. However, they are useful within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; for list processing and to support SQL multicolumn keys. (See the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SQL Server User&#039;s Guide for more information.) Therefore, the INVISIBLE field attribute is allowed, but INVISIBLE fields are not mapped to SQL-accessible columns. The following rules and restrictions apply to INVISIBLE fields in 1NF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because the INVISIBLE and AT-MOST-ONE attributes are incompatible, INVISIBLE fields must be defined as REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot REDEFINE a field as INVISIBLE within a 1NF file; you can specify the INVISIBLE and REPEATABLE attributes only with a DEFINE command. In the case of a record security key field, specify the field as INVISIBLE and REPEATABLE using the INITIALIZE command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE fields in 1NF files must also be ORDERED or KEY. NUMERIC RANGE is not legal in a 1NF file and results in an error message)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
====Defining AT-MOST-ONE and REPEATABLE fields in non-1NF files====&lt;br /&gt;
&amp;lt;p&amp;gt;You can DEFINE or REDEFINE a field to be AT-MOST-ONE in any non-1NF &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created after Release 9.0. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When redefining a field to AT-MOST-ONE that does not currently have the OCCCURS 1 attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; scans Table B to verify that no multiple occurrences of the field exist in any record. If any field violates the AT-MOST-ONE constraints, the REDEFINE fails and the following error message is displayed for each violation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2122: AT-MOST-ONE CONSTRAINT VIOLATION FOR FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
====Using the AT-MOST-ONE or the OCCURS 1 attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;Although both the AT-MOST-ONE and OCCURS 1 attributes prevent more than one occurrence of a field in a record, they achieve their goal in different ways. For non-1NF files, use either the AT-MOST-ONE or the OCCURS 1 attribute. Using both causes redundant processing. Understanding the advantages of each may help you decide which attribute you want to use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;AT-MOST-ONE attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Does not preallocate the field. Therefore, if the field values between records are of very different lengths or if you do not know the length of the longest record, use AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Allows you to correct violations before the record is stored with the ON FCC unit. If you do not use an ON FCC unit, then a constraint violation cancels the request. Therefore, if it is important to allow users to correct violations, or it is important that the request not be canceled, use AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OCCURS 1 attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocates space for the field in every record. If you are storing a large number of records and the length of the value is generally the same, pre-allocating the field with OCCURS 1 can save you processing time. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cancels the request when a violation occurs. With OCCURS 1, you cannot use an ON FCC unit to correct violations. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
====Compatibility with other field attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;AT-MOST-ONE is not compatible with the following field attributes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;OCCURS greater than 1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;REPEATABLE&lt;br /&gt;
&amp;lt;p&amp;gt;REPEATABLE is compatible with all field attributes except AT-MOST-ONE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Coordinating AT-MOST-ONE and UNIQUE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;Both AT-MOST-ONE and UNIQUE are examples of field-level constraints. Although the function of the UNIQUE and AT-MOST-ONE attributes appear similar, their actual operations differ:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Affects...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Value of the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of fields per record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if a Social Security field within an EMPLOYEE file is both UNIQUE and AT-MOST-ONE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Ensures that...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Social security number for every employee is different.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Each employee has only one social security number. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Coordinating the use of the AT-MOST-ONE and the UNIQUE attributes increases the integrity and accuracy of your records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFERRABLE and NON-DEFERRABLE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFERRABLE and NON-DEFERRABLE attributes let you specify whether the updates to the index (Tables C and D) for a KEY ORDERED field can be deferred; that is, stored or updated at a later time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFERRABLE attribute is recommended and is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NON-DEFERRABLE attribute is not specified when a field is defined, the DEFERRABLE attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Choosing between DEFERRABLE and NON-DEFERRABLE====&lt;br /&gt;
&amp;lt;p&amp;gt;Under normal circumstances, the storing and updating of records in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is done all at once. That is, Tables B, C, D, E, and X are changed simultaneously. When there is a high volume of updates (for example, a Batch2 process adding large numbers of records), efficiency and space reductions can be gained by deferring the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Under some circumstances, it may be necessary to override this deferral of updates to the index for particular fields. For instance, consider a situation in which new records are added Online to a personnel file. You might be willing to wait a day for the ability to retrieve the new records. The updates to Tables C and D are deferred until a batch processing window (and the application of deferred updates does require exclusive access to the file), when they are done in a batch run. However, when adding new records, you want to ensure that a record containing a duplicate Social Security number (for example) is not added to the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can define the Social Security number field as NON-DEFFERABLE and write a procedure to retrieve any records already in the file that have the new Social Security number and display an error message if one is found. If updates to the index on this field have been deferred, you would not find a duplicate added earlier in the same day. By selecting the NON-DEFERRABLE attribute for the Social Security number field, you can ensure that Tables C and D are updated immediately. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To provide immediate updating in BATCH204 runs, special action must be taken. See &amp;quot;Overriding deferred updates&amp;quot; for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can also detect duplicate Social Security numbers by defining the field with the UNIQUE and ORDERED attributes. See [[#UNIQUE and NON-UNIQUE attributes|UNIQUE and NON-UNIQUE attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFERRABLE/NON-DEFERRABLE attribute is invalid for a field that has these attributes: BLOB, CLOB, NON-KEY, NON-ORDERED, and NON-RANGE. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a chart showing valid and invalid attribute combinations, see [[ Field Attribute Combinations#Combining attributes|Combining attributes]]. If you are defining field attributes with FILEMGMT, you will not be allowed to specify incompatible attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Field Constraints&amp;quot;&amp;gt;&lt;br /&gt;
== Field and Content Constraints == &lt;br /&gt;
&lt;br /&gt;
You may set up constraints to prevent &#039;invalid&#039; updates to the file. The updates may be invalid because to permit them would violate rules about the field (a second occurrence to an AT-MOST-ONE field, for example). Or you may set up &#039;content&#039; constraints to prevent values outside of those permitted to be stored.&lt;br /&gt;
&lt;br /&gt;
=== Field Constraints ===      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ON FIELD CONSTRAINT CONFLICT (ON FCC) unit ====&lt;br /&gt;
&lt;br /&gt;
(should probably be mentioned only as a link to UL page) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To help control processing with UNIQUE and AT-MOST-ONE fields, use the User Language ON FCC unit. ON FCC is invoked whenever a field-level constraint conflict, such as an attempt to add a second occurrence of an AT-MOST-ONE field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An ON FCC unit is used with a number of $functions that can help you determine exactly where the field constraint conflict has occurred. The $UPDSTAT function is discussed below. All other $functions for ON FCC are discussed in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;$UPDSTAT function&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The $UPDSTAT function is used in conjunction with the ON FIELD CONSTRAINT CONFLICT unit and field attributes which have field-level constraints of UNIQUE and AT-MOST-ONE. You &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;must&amp;lt;/var&amp;gt; use $UPDSTAT in the ON FCC unit when writing procedures for files that have (or might have in the future) more than one type of field-level constraint defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If $UPDSTAT is invoked from an ON FCC unit following the detection of a field-level constraint conflict, it returns a numeric value denoting the type of conflict that has occurred:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meaning      &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No violation occurred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Uniqueness violation occurred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE violation occurred &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The $UPDSTAT function takes no arguments.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;See information about the [[#AT-MOST-ONE and REPEATABLE attributes|AT-MOST-ONE and REPEATABLE attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;UNIQUE and ORDERED fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses the Ordered Index to process UNIQUE values, fields defined as UNIQUE must also be defined as ORDERED. For more information about the Ordered Index see [[#ORDERED and NON-ORDERED attributes|ORDERED and NON-ORDERED attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====UNIQUE and NON-UNIQUE attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;Defining a field with the UNIQUE attribute allows &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to ensure that a given field name = value pair occurs only once in a file. A Social Security number field is one example that might benefit from having the UNIQUE attribute. The UNIQUE attribute specifies that there can be only one occurrence of a field in the file. Multiple occurrences are not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When storing a field specified as UNIQUE, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; first queries the Ordered Index, looking for an identical field-name-equals-value pair. If it finds an identical value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; issues an error message and does not perform the update. This is true both within a record for multiply occurring fields and between records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is not a uniqueness conflict, that is, if the field-name-equals-value pair being stored is unique, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; completes the update.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the UNIQUE attribute is not specified when a field is defined, the NON-UNIQUE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Unique values in multiply occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a multiply-occurring field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that each occurrence of the field is unique. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Deleting UNIQUE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because UNIQUE values use the Ordered Index, do not use the DELETE ALL RECORDS statement for deleting records. Use DELETE RECORD instead.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field can only be specified as UNIQUE with the following restrictions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields must be specified as ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields cannot be specified as DEFERRABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields cannot be defined in non-TBO (Transaction back out) files. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you attempt to define a UNIQUE key under any of these circumstances, you receive an error message and the field is not defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Defining a LEVEL clause====&lt;br /&gt;
&amp;lt;p&amp;gt;To secure a field against unauthorized access, include a LEVEL clause in the field&#039;s description. &amp;lt;b&amp;gt;See&amp;lt;/b&amp;gt; discusses field-level security and describes the types of field access: SELECT, READ, UPDATE, and ADD. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field-level security has a negligible impact on both performance and storage usage.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Content Constraints ===&lt;br /&gt;
&lt;br /&gt;
====Setting a pattern for a field value: the LIKE attribute====&lt;br /&gt;
The LIKE attribute is available as of Model 204 release 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a field pattern lets you specify a pattern that a field value must conform to, otherwise it cannot be stored. The patterns you can specify are the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; LIKE patterns. See the chapter on pattern matching in the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 User Language Manual&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD G WITH LIKE &#039;@@@####&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This example specifies that field G must start with three alphabetic characters followed by four numeric characters. An attempt to store a field value that does not conform to the field&#039;s pattern results in request cancellation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can limit a field value to a list of values. For, example, if a field must have a value of &#039;M&#039; or &#039;F&#039; you could code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD SEX WITH LIKE &#039;M,F&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And if you want a BALL field to have a value &#039;SPLITTER&#039;, &#039;CURVE&#039;,  &#039;KNUCKLE&#039;, or &#039;CHANGE UP&#039; you could code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD BALL WITH LIKE -&lt;br /&gt;
 &#039;SPLITTER,CURVE,KNUCKLE,CHANGE UP&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The maximum pattern length is 47 characters. The maximum default value length is 31 characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As with the IS LIKE operator in User Language, the patterns are always applied to numbers after conversion to a string.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot use the LIKE attribute to define an automatic field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Range constraints====&lt;br /&gt;
Range constraints are available as of Model 204 version 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;You can set range constraints on fields using the range attributes. Each set of range attributes is comprised of three or four attributes that you can use to establish a range for field length values, integer values, float values, or date/time stamp values. The types of range attributes are mutually exclusive. For example, you cannot define a field with the LENGTH-GE and INTEGER-LE attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The range constraints are self-editing. If you define a field with LENGTH LE 6 and LENGTH GE 8, the definition is rejected and an error message is issued.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When a range constraint is redefined, it replaces the existing field constraint.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The range constraints do not have to match the data type of the stored field. That is, you can have a date/time constraint for a STRING field or an integer constraint for a FLOAT field, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Defining fields with length constraints=====&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Length constraint attributes &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Range&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-EQ &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the required length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the minimum length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the maximum length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following field definitions illustrate using the length constraint attributes, LENGTH-EQ, LENGTH-GE, and LENGTH-LE, with each other and/or with other attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD A WITH LENGTH-EQ 8 BINARY OCCURS 1&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD B WITH LENGTH-GE 4 FLOAT LEN 8&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD C WITH LENGTH-LE 10&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD D WITH LENGTH-LE 10 LENGTH-GE 3&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD E WITH LENGTH-LE 6 LENGTH-GE 6 BINARY&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD F WITH LENGTH-LE 255 LENGTH-GE 0&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD COLOR WITH EXACTLY-ONE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The length constraints apply to the string representation of non-string types as they would be stored in the database. This means that the length of a FLOAT field with value 34.000 would be 2 because after being stored in the database it will return 34 on a retrieval.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====LENGTH-EQ (LEQ) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-EQ attribute is followed by a number from 0 to 255 that indicates the required length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-EQ attribute is not allowed for automatic fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====LENGTH-GE (LGE) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-GE attribute is followed by a number from 0 to 255 that indicates the minimum length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-GE attribute is not allowed for automatic fields. You can pair the LGE attribute with the LLE attribute, creating a length range. However, if the range is not valid or overlaps, an error message is invoked.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====LENGTH-LE (LLE) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-LE attribute is followed by a number from 0 to 255 that indicates the maximum length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-LE attribute is not allowed for automatic fields. You can pair the LLE attribute with the LGE attribute, creating a length range. However, if the range is not valid or overlaps, an error message is invoked.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====Setting an integer value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;For Integer values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Integer attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies that the integer value must be...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-LT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for a field must be an integer with a value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD NCHILDREN WITH INTEGER-LE 100&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The NCHILDREN field can have an integer value of less than or equal to 100.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; An integer constraint will not accept a value that would be stored with a decimal place. If you have an integer constraint INTEGER-GE 10 and try to store value 10.0, it will fail because 10.0 is not an integer.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====INTEGER-GE (INTGE), INTEGER-GT (INTGT), INTEGER-LE (INTLE) and INTEGER-LT (INTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;The integer range attributes-INTGE, INTGT, INTLE, INTLT-can be defined singly or as a pair on a field. The integer range attributes establish a range of acceptable integer values for the field. If a record is added with an integer value that is not within the range, the record is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify another type of range attribute on the same field, such as DATETIME-LE or FLOAT-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
=====Setting a float value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;For float values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Float attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies that the float value must be...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-LT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for a field must be a floating point value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WEIGHT WITH FLOAT-GT 10.5&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The WEIGHT field must have a float value greater than 10.5. &amp;lt;/p&amp;gt;&lt;br /&gt;
=====FLOAT-GE (FLTGE), FLOAT-GT (FLTGT), FLOAT-LE (FLTLE) and FLOAT-LT (FLTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;The float range attributes-FLTGE, FLTGT, FLTLE, FLTLT-can be defined singly or as a pair on a field. The float range attributes establish a range of acceptable float values for the field. If a record is added with a float value that is not within the range, the record is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify another type of range attribute on the same field, such as DATETIME-LE or INTEGER-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
=====Setting a date/time value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;For date/time values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Date/time attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies that the date/time value must be...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Later than or the same as the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Later than the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Earlier or equal to the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-LT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Earlier than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for field must be a date/time value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD BIRTHDATE WITH DATETIME-GE 18900101 -&lt;br /&gt;
                               DATETIME-LT 20100101&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BIRTHEDATE field is required to have a date/time value greater than or equal to January 1, 1890 and less than January 1, 2010. As with any other date/time values, the values can be extended with HH, HHMM, HHMMSS, HHMMSSX, HHMMSSXX, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====DATETIME-GE (DTGE), DATETIME-GT (DTGT), DATETIME-LE (DTLE), and DATETIME-LT (DTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;The date/time range attributes-DTGE, DTGT, DTLE, DTLT-establish a range of acceptable dates for the value of the field. If a record is added with a date that is not within the range, the record is rejected. You can specify a single date/time range attribute or a pair of them on a field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify another type of range attribute on the same field, such as FLOAT-LE or INTEGER-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for a field must be a date/time with a value that has the proper relationship to the following value. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD BIRTHDATE WITH DATETIME-GE 18900101 -&lt;br /&gt;
 DATETIME-LT 20100101&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BIRTHDATE field is required to have a date/time value greater than or equal to January 1, 1890 and less than January 1, 2010. As with any other date/time values, the values can be extended with HH, HHMM, HHMMSS, HHMMSSX, HHMMSSXX, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concatenated Fields ==&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; General Availability of the concatenated fields feature is in Model 204 release 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that make up concatenated field values must be either AT-MOST-ONE, EXACTLY-ONE, or OCCURS 1 and must all be in the same field group context (including no field group). FIELDGROUP * are not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields defined with range attributes cannot be used in concatenation processing. For more information on this, see &amp;quot;Range Constraints&amp;quot; on [[|]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following syntax is used to define a concatenated field with a separator and an escape character:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD fieldname WITH CONCATENATION-OF -&lt;br /&gt;
 field1 WITH field2 [WITH field3 [WITH field4 -&lt;br /&gt;
 [AND . . .]]] -&lt;br /&gt;
 [SEPARATOR (char | X&#039;hex&#039; | NONE)] -&lt;br /&gt;
 [ESCAPE (char | X&#039;hex&#039; | CANCEL)] &lt;br /&gt;
 [OtherAttributes . . .]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The SEPARATOR character appears between the field values that comprise the concatenated field. Up to eight fields may be defined for a concatenated field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Concatenated fields could be longer than 255 bytes after adding separator characters and escaping results in request cancellation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Concatenated fields have the following field attribute support.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Concatenated field attributes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Purpose&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CONCATENATION-OF (CAT) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;List the fields that make up that concatenated field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ESCAPE (ESC) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies a character that is used to escape separator characters that occur in a field that requires a terminating separator character&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SEPARATOR (SEP) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies the character that terminates fields that do not have a fixed length and are not the last field in the concatenation&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a required attribute is not assigned a value, the default value is used. For example, if you define a CONCATENATEION-OF field, which requires the SEPARATOR attribute, and you do not enter the SEPARATOR attribute, the default value of X&#039;00&#039; is used as the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
===CONCATENATION-OF (CAT) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The CONCATENATION-OF (CAT) attribute is followed by a list of fields that make up that concatenated field. At least two are required and up to eight are allowed. The field names must be separated by the word WITH and subsequent field attributes must be separated from the list by the word AND. Each field specified in the list of concatenated fields must have the EXACTLY-ONE attribute specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ESCAPE (ESC) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The ESC attribute is followed by one of the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single character in C&#039;&amp;amp;lt;char&amp;gt;&#039; or X&#039;&amp;amp;lt;hex&amp;gt;&#039; format that specifies the character that is used to escape separator characters that occur in a field that requires a terminating separator character. In addition to escaping the separator character, the escape character can also escape itself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CANCEL, which means that an attempt to store a separator character in a field that requires a terminating separator results in request cancellation.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default ESCAPE character is X&#039;01&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define an ESCAPE value for a field, you cannot redefine the ESCAPE value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ESCAPE character cannot match the SEPARATOR character. The ESCAPE character is always displayed on DISPLAY FIELD output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ESCAPE attribute is not allowed on a field definition, if the SEPARATOR NONE attribute is specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the ESCAPE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ESC character is inserted into a concatenated field when the real data being added to the database contains the SEPARATOR or the ESCAPE character itself. When reading in stored values, programs use the ESC character to differentiate between the special characters and normal data that happens to include the special characters. When the processing encounters the ESCAPE character in a concatenated field, it knows that the next character is real data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The ESCAPE character applies to all fields except the last field in the concatenation. The programmer is expected to know how many components comprise the concatenation and therefore, special characters occurring in the last component must be real data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Consider the following field definitions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD A_CONCAT_TEST1 WITH AT-MOST-ONE&lt;br /&gt;
DEFINE FIELD A_CONCAT_TEST2 WITH AT-MOST-ONE&lt;br /&gt;
DEFINE FIELD A_CONCAT_TEST3 WITH CONCATENATION-OF -&lt;br /&gt;
             A_CONCAT_TEST1 WITH -&lt;br /&gt;
             A_CONCAT_TEST2 AND  -&lt;br /&gt;
             SEPARATOR  C&#039;+&#039;     -&lt;br /&gt;
             ESCAPE     C&#039;/&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If we then do:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
IN POLICIES STORE RECORD&lt;br /&gt;
                  A_CONCAT_TEST1 = 1ST+VALUE+&lt;br /&gt;
                  A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
            END STORE&lt;br /&gt;
FRN $CURREC&lt;br /&gt;
    NP&lt;br /&gt;
    PAI&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;We get:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST+VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
A_CONCAT_TEST3 = 1ST/+VALUE/++2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The plus signs in the stored records are intentionally part of the data. For the concatenated field &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores the escape character preceding the plus signs in the data for all but the last field in the concatenation. This assumes that the programmer knows how many fields there are in the concatenation and therefore knows that any separator characters in the last field are data fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In storing the escape character immediately before any plus signs that are part of the data proper, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; tells the programmer that they are to be read as data. If there were any escape characters in the data proper, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; puts an escape character before the data proper version as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
IN POLICIES STORE RECORD&lt;br /&gt;
                  A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
                  A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
            END STORE&lt;br /&gt;
FRN $CURREC&lt;br /&gt;
    NP&lt;br /&gt;
    PAI&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;... giving the output ...&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
A_CONCAT_TEST3 = 1ST//VALUE/++2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you do not want either the separator or the escape character in the concatenated field, you can enforce this by assigning the value &#039;CANCEL&#039; as the escape character as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD A_CONCAT_TEST1 WITH CONCATENATION-OF -&lt;br /&gt;
             A_CONCAT_TEST1 WITH                  -&lt;br /&gt;
             A_CONCAT_TEST2 AND                   -&lt;br /&gt;
             SEPARATOR C&#039;+&#039;                       -&lt;br /&gt;
             ESCAPE CANCEL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In which case, the concatenation will be ignored and our STORE record results in the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; There are no error messages associated with this condition.&amp;lt;/p&amp;gt;&lt;br /&gt;
===SEPARATOR (SEP) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The SEP attribute is followed by one of the following options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single character in C&#039;&amp;amp;amp;lt;char&amp;gt;&#039; or an X&#039;&amp;amp;amp;lt;hex&amp;gt;&#039; format that specifies the character that terminates fields that do not have a fixed length and are not the last field in the concatenation. The separator character is always used between field values, regardless of any length constraints on the component fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The NONE option that means the fields in the concatenation are concatenated end to end with no separator character and regardless of their length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you define a field with the SEP attribute, you must supply a value. Otherwise, the following error is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE MAKE_MODEL WITH CONCATENATION-OF MAKE WITH MODEL - AND ORD SEP ESC CANCEL&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** 1 M204.0405: INVALID DEFINE OPTION: SEP ESC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you define a field without the SEP attribute, it defaults to X:00:, as shown in the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE MAKE_MODEL WITH CONCATENATION-OF MAKE WITH MODEL -&lt;br /&gt;
 AND ORD ESC CANCEL&lt;br /&gt;
&lt;br /&gt;
D FIELD (ABBREV) MAKE_MODEL&lt;br /&gt;
MAKE_MODEL&lt;br /&gt;
 (DEF NFRV NKEY NCOD STR NNR VIS UP ORD CHAR LRES 15 -&lt;br /&gt;
 NRES 15 SPLT 50 IMM 1 NUNIQ ONE CAT MAKE WITH MODEL AND -&lt;br /&gt;
 SEP X&#039;00&#039; EXC CANCEL)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define a SEPARATOR value for a field, you cannot redefine the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The SEPARATOR character cannot match the ESCAPE character. The SEPARATOR character is always displayed on DISPLAY FIELD output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the SEPARATOR NONE attribute is specified on a field definition, the ESCAPE attribute is not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Defining concatenated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Using the fields defined in [[|]] and the following fields, you can define concatenated fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD COLMOD WITH CONCATENATION-OF COLOR -&lt;br /&gt;
WITH MODEL AND SEP C&#039;-&#039; ESC C&#039;+&#039;&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MODCOL WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR AND SEP C&#039;$&#039; ESC C&#039;*&#039;&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MODCOLI WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MCY WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR WITH YEAR AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD COLCNT WITH CONCATENATION-OF COLOR -&lt;br /&gt;
WITH COUNTRY AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD CNTYR WITH CONCATENATION-OF YEAR -&lt;br /&gt;
WITH COUNTRY AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Defining concatenated fields in a field group context===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD BATTERS&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELDGROUP STARTERS&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD NTRIP WITH CTO STARTERS AND EXACTLY-ONE&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD A WITH AT-MOST-ONE FIELDGROUP STARTERS AND-&lt;br /&gt;
ORDERED CHARACTER&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD B WITH AT-MOST-ONE FIELDGROUP STARTERS AND -&lt;br /&gt;
KEY&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD C WITH AT-MOST-ONE FIELDGROUP STARTERS AND &lt;br /&gt;
ORDERED NUMERIC&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD AB WITH FIELDGROUP STARTERS AND -&lt;br /&gt;
CONCATENATION-OF A WITH B AND SEP C&#039;/&#039;&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD ABO WITH FIELDGROUP STARTERS AND -&lt;br /&gt;
CONCATENATION-OF B WITH A AND SEP C&#039;+&#039; ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD ABI WITH CONCATENATION-OF B WITH A AND -&lt;br /&gt;
SEP C&#039;+&#039; ORDERED INVISIBLE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; A field in a concatenated field value does not have a terminating separator set only if it is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Last field in the concatenation, or&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed length (LENGTH-EQ set) and the default value has the same length as LENGTH-EQ.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify the ESCAPE CANCEL attribute for a field and the SEPARATOR character for that field is in one of the field values for the concatenated string, the update is cancelled. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Automatic Fields&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Automatic Fields == &lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Automatic fields are available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; lets you define a field whose value is automatically maintained. For example, a field may count occurrences of another field so that every store or delete of the field occurrence changes the count in the automatic field. The automatic fields are fields defined with the following attributes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;COUNT-OCCURRENCES-OF&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of an automatic field is updated at the start of a transaction by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and you cannot set it explicitly by a program. Any valid update causes the appropriate time and user stamps to be updated. For example, DELETE FOO(8). when there are no occurrences of FOO in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define an automatic value for a field, you cannot redefine the automatic value.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Automatic Field Context===&lt;br /&gt;
&amp;lt;p&amp;gt;Automatic fields can operate in a record or field group context. For example, with the following set of fields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;...&lt;br /&gt;
DEFINE FIELDGROUP ADDRESS&lt;br /&gt;
...&lt;br /&gt;
DEFINE FIELD RECORD.UPDT.TIME (DATETIME UPDT-TIME)&lt;br /&gt;
DEFINE FIELD ADDRESS.LINE.1 (SN NONE FG ADDRESS)&lt;br /&gt;
...&lt;br /&gt;
DEFINE FIELD ADDRESS.UPDT.TIME (DATETIME FG ADDRESS AND UPDT-TIME)   &lt;br /&gt;
...&amp;lt;/P&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any update to any field in a record will automatically update RECORD.UPDT.TIME.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any update to any field in an occurrence of the ADDRESS field group will cause the ADDRESS.UPDT.TIME for that occurrence to be updated. (And, of course, the record level RECORD.UPDT.TIME as well.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rules for the definition of Automatic Fields===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;COUNT-OCCURRENCES-OF (CTO) attribute&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;p&amp;gt;The COUNT-OCCURRENCES-OF (CTO) attribute is not allowed for fields defined as REPEATABLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because one of the major advantages of CTO fields is to avoid unnecessary record scans, it is highly recommended that the field be preallocated. Otherwise the field is stored and updated in Table B in the normal way.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Field Design (File Management)#Counting occurrences of a field|Counting occurrences of a field]] for details on its use.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other automatic fields&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All other automatic fields capture the add/update user/time as of the start of the transaction. Any of these attributes can be be added to empty or non-empty fields (via a [[REDEFINE command]]). The value is maintained by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; processing, so you cannot change the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These automatic attributes cannot be defined as REPEATABLE (the default is AT-MOST-ONE).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Field Design (File Management)#Tracking updates using automatic fields|Tracking updates using automatic fields]] for details on their use.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying automatic fields===&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify the AT-MOST-ONE or EXACTLY-ONE attribute for an automatic field. These attributes affect the order in which the fields are displayed on a PAI statement. EXACTLY-ONE fields are displayed in the order they were defined, whereas AT-MOST-ONE fields are displayed in the order they are stored in Table B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Currently Table B stores automatic fields in the following order:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Counting occurrences of a field===&lt;br /&gt;
&amp;lt;p&amp;gt;To create such a field you use the COUNT-OCCURRENCES-OF (CTO) keyword on a field definition followed by the name of the field that the field or field group for which the count is automatically maintained. For example, if you have field group DRUG you could define an automatic count field as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP DRUG&lt;br /&gt;
DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot define a CTO field in a file that has had records already added to it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You could also make the automatic count field a binary field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH CTO DRUG AND BINARY OCCURS 1&lt;br /&gt;
DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG AND -&lt;br /&gt;
BINARY&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; AND is a separator between a field or field group name and other field attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An automatic count field can also be an OCCURS 1 field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG AND BINARY OCCURS 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An automatic counter field could even be ORDERED, KEY or NUMERIC RANGE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH CTO DRUG AND BINARY OCCURS 1 ORDERED NUMERIC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can find all records with N occurrences of field group DRUG. Or, you can find those that have more or less than some number of occurrences.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Limitations on COUNT-OCCURRENCES-OF (CTO) fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields defined with the CTO attribute cannot also have the UPDATE AT END attribute. You cannot define a CTO field that counts occurrences of UPDATE AT END fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot use a CTO field to count occurrences of OCCURS fields, even though the OCCURS count is greater than 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also, you cannot define a CTO field in a file that has had records already added to it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There is a maximum of one CTO field per field or field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Retrieving the value of a CTO field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can retrieve values of CTO fields via the field name (as with any VISIBLE field), as in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PRINT DRUGCT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%DRUGCT = DRUGCT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Automatic optimization with COUNT OCCURRENCES OF fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The use of CTO fields automatically optimizes many of the record scan processes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Operations on Multiply Occurring Fields#FOR EACH OCCURRENCE OF loops|FOR EACH OCCURRENCE OF]] loops. &lt;br /&gt;
&amp;lt;p&amp;gt;If a CTO field exists for the field or field group that is being looped over via an FEO or FAO statement, the value of that field limits the number of times the loop is processed, which reduces the need to scan to the end of record for every FEO or FAO statement. Note that when a record is updated or might be updated mid-loop, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; normal concerns about subscript handling in these statements need to be considered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FOR FIELDGROUP clause&lt;br /&gt;
&amp;lt;p&amp;gt;Before processing a FOR FIELDGROUP loop, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks whether the requested occurrence is in the record based on the CTO field. If the User Language request is for occurrence 3, but the CTO field indicates only two occurrences in the record, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stops processing the FOR loop.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field extraction&lt;br /&gt;
&amp;lt;p&amp;gt;Before extracting a field &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks whether the requested occurrence is in the record based on the CTO field. If the User Language request is occurrence 3, but the CTO field indicates only two occurrences in the record, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sets the result to null (or NOT PRESENT). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note the in the case of the subscripted field optimization:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;       FOR %I FROM 1 TO %N&lt;br /&gt;
          %FOO = FOOFIELD(%N)&lt;br /&gt;
       END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks only the number of occurrences on the first iteration of the loop.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In all cases, the greatest benefit from the CTO field optimization is when a record contains no occurrences of the requested field or field group. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; immediately determines that no occurrence is on the record and stops scanning the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining an efficient CTO field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The counter fields are always physically present in the record. Using a DEFAULT-VALUE of zero for such a field defeats its purpose as you need to scan the entire record to determine whether to use the default value. When you issue a STORE RECORD statement, all CTO fields are stored as 0 in the record. For non-OCCURS, fields are always the first variable length fields in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support recommends that you define a CTO field as BINARY OCCURS 1, as these require only four bytes per record, whereas the minimum length of a variable length field is four bytes (for a compressed 0) and will be at least five for any non-zero value. A CTO field inside a field group cannot be an OCCURS field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The absolute maximum value for CTO fields is currently X&#039;3FFFFFFF&#039; or 1,073,741,823 since BINARY fields use the high order two bits to distinguish values from coded values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot update CTO fields; attempts are caught at compile-time for explicit file-context references and at run-time for group-context and field-name variables. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;CTO fields can even be in field groups and zeros are stored for CTO fields when the ADD FIELDGROUP or INSERT FIELDGROUP statement is processed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Displaying CTO fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default, the PRINT ALL INFORMATION (PAI), AUDIT ALL INFORMATION (AAI), PRINT ALL FIELD GROUP INFORMATION (PAFGI), and AUDIT ALL FIELDGROUP INFORMATION (AAFGI) statements do not display CTO (counter fields). When you are using PAI [INTO] to reorganize your files or to copy records, the automatic fields are likely to cause problems.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Under other circumstances you can use the argument to indicate that you do want automatic fields to be printed by these statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tracking updates using automatic fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can now track the date/time when a record was created or updated and what user ID created or updated it. &lt;br /&gt;
This tracking can be accomplished by using one of the following field tracking attributes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Tracking attribute &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Abbreviation&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Tracks the...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-TIME &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CRTM&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was created using machine time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-TIMEUTC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CRTMU&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was created using Coordinated Universal Time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-USER &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CRUS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User ID that created the record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-TIME &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPTM&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was updated using machine time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-TIMEUTC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPTMU&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was updated using Coordinated Universal Time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-USER &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPUS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User ID that updated the record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All of the automatic fields that contain date/time information also have the DATETIME attribute. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot update tracking fields with User Language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A record or field group can contain only a single field of each update tracing type (CREATE-USER, UPDATE-USER, CREATE-TIME, UPDATE-TIME). An attempt to create a second invokes an error message.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can define update tracking fields (CREATE-TIME, UPDATE-TIME, CREATE-USER, UPDATE-USER) in an already populated file, even an update tracking field for the main records or a field group that already has occurrences. You can also define a DEFAULT-VALUE field, which defaults to a null string. This lets you define such fields with or without a reorganization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Tracking fields for records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The file itself may have a single field defined for each of the tracking fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An attempt to define a second field of the same type on the file results in an error message, for example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD RECORD.CREATE.TIME WITH CREATE-TIME&lt;br /&gt;
DEFINE FIELD RECORD.CREATE-TIME2 WITH CREATE-TIME&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2866: FILE ALREADY HAS A CREATE-TIME FIELD&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UPDATE tracking fields for the records are updated when any field in the record changes and the create tracking fields are added to the record when it is initially stored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Tracking fields for field groups&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Automatic tracking fields can also provide a date/time and user stamp of the creator and last update of each occurrence of a field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If an UPDATE-TIME tracking field is defined as a part of the field group as shown below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD MY_UPDATE_TIME WITH FIELDGROUP X AND -&lt;br /&gt;
                                ORD NUM UPDATE-TIME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;then each occurrence of field group X will contain the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting a date/time field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DATETIME attribute indicates the format of the data stored in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can now define a field with a DATETIME attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH DATETIME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DATETIME fields use seven bytes to store the value (plus four bytes overhead, if the field is not preallocated). A binary representation is used to store the 20-character full date format so that it can be held in seven bytes. the DATETIME attribute may not be combined with KEY. You assign a string to it in &amp;lt;var&amp;gt;YYYYMMDDHHMMSSXXXXXX&amp;lt;/var&amp;gt; format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE FOO DEFINE FIELD WHEN WITH DATETIME&lt;br /&gt;
...&lt;br /&gt;
BEGIN&lt;br /&gt;
  IN FILE FOO STORE RECORD&lt;br /&gt;
    WHEN = &#039;2010070413470643516378&#039;&lt;br /&gt;
  END STORE&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you attempt to store the field with invalid data such as, WHEN = &#039;72&#039;, the request will be cancelled and you will receive an error:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;***  1  CANCELLING REQUEST: M204.2865: ATTEMPT TO ADD INVALID DATETIME VALUE: WHEN = 72&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As most timestamps do not require microseconds, you can specify 10ths, 100ths, 1,000ths, 10,000ths and 100,000ths of a second. The value is simply padded on the right with zeros. For date/time field WHEN, the following are all equivalent:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704134706000000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070413470600000&#039;&lt;br /&gt;
ADD WHEN = &#039;200907041347060000&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704134706000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070413470600&#039;&lt;br /&gt;
ADD WHEN = &#039;200907041347060&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704134706&#039;&lt;br /&gt;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, you can leave off seconds, minutes or hours so the following are all equivalent:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704000000&#039;&lt;br /&gt;
ADD WHEN = &#039;200907040000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070400&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which are also, of course, equivalent to&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704000000000000&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing dates or date/times efficiently&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The shortest valid format for a field with the DATETIME attribute contains YYYYMMDD. If the values you are storing are simple dates, they can be stored in four bytes as binary values, so requires three fewer bytes per value than a date/time field. However, for anything with a time in it (even just hours), a DATETIME field takes less space than the alternative field types (FLOAT or STRING).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Automatic validation of date/times&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to the compact storage of date/time stamps, DATETIME fields also provide automatic validation of the values stored into them. That is, you cannot store numbers into them that are not valid dates. For example, you cannot store &#039;9999111&#039; into a DATETIME field, nor can you store &#039;20070931&#039; (because September does not have 31 days), nor can you store &#039;20070229&#039; (because 2007 is not a leap year, so February only has 28 days).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DATETIME fields also provide for field content validation for DATETIME fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; It is possible to set a DATETIME DEFAULT-VALUE to an invalid date/time value, such as &#039;_&#039;, and to set a DATETIME field to that value. That value will not be stored in the database and the value returned for an EXACTLY-ONE field value that had not been set would be the default value in such a case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value returned for DATETIME fields is always in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;YYYYMMDDHHMMSSXXXXXX&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are interested in only part of the time stamp, you can either use the $SUBSTR function to get the part you want or make the %variable that will hold the time stamp length you are interested in. So, if you want %WHEN to hold a date/time in YYYYMMDDHHMISS format, simply declare %WHEN as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%WHEN IS STRING LEN 14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
%WHEN = WHEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DATETIME values can be indexed either as ORDERED CHARACTER or ORDERED NUMERIC. When indexed as ORDERED NUMERIC, only the first 15 digits (&amp;lt;var&amp;gt;YYYYMMDDHHMISSX&amp;lt;/var&amp;gt;) are indexed. When a DATETIME field is indexed as ORDERED CHARACTER, it is indexed as the string representation of the date/time value in the full &amp;lt;var&amp;gt;YYYYMMDDHHMISSXXXXXX&amp;lt;/var&amp;gt; format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Making DATETIME fields KEY fields is not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Update processing&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Date/time values are the date/time of the start of the update processing, so all records, fields and field groups updated by a single update get the same time stamp. Furthermore, the code that starts an update unit ensures that the date/time stamp of each update unit is unique.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The M204.0173 and M204.0172 messages were expanded to include the date/time stamp.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0173: START OF UPDATE 12 AT 10:11:00.51 (20090705101100511734)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0172: END OF UPDATE 12 AT 10:11:00.56 (20090705101100511734)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining various UPDATE-USER fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To indicate whether an update tracking field applies to a record or field group, specify or do not specify the containing field group on the field definition. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHO WITH UPDATE-USER&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The WHO field contains the user ID of the last user that updated anything in the record. The following example illustrates defining an UPDATE-USER field in a field group:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DR.WHO WITH UPDATE-USER FIELDGROUP DR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DR.WHO field contains the user ID of the last user that updated an occurrence of field group DR.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining various UPDATE-TIME fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify an update tracking field as FIELDGROUP *, which means that all field groups and the primary record all use the same update tracking field. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH UPDATE-TIME FIELDGROUP *&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The WHEN field is placed in the primary record and each field group to track the last update time. If a file has a FIELDGROUP * update tracking field and a field group or record has a different comparable updating tracking field, the field group or the record specific tracking field applies to the field. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH UPDATE-TIME FIELDGROUP *&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD MAIN.WHEN WITH UPDATE-TIME OCCURS 1&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD FOO.WHEN WITH UPDATE-TIME FIELDGROUP FOO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The field WHEN would be updated for changes to any field group occurrences in field groups that do not have their own UPDATE-TIME field defined.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Field MAIN.WHEN would be set for any update to any field in the record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The field FOO.WHEN would be set in field group FOO for any update to a field group occurrence.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UPDATE-TIME field in a field group that has a nested field group will be updated when the nested field group is updated, even though no fields in the containing field group were updated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An alternate approach to adding a date-time stamp field to your files===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is a more general way you can include a date-time stamp field in your files. The date/time stamp feature lets you put a date-time stamp (DTS) on each record that was updated in a transaction. You can then use the data in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date/time stamp&amp;lt;/var&amp;gt; field in an end-user written application to find and process all the rows of data that were changed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An application that processes these records can track the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date/time stamp&amp;lt;/var&amp;gt; field values that have been processed to date, or it may take another action, including updating the date/time stamp field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To install and use this functionality, see [[Setting Up the Date-Time Stamp Field]]. Once installed, the date-time stamp feature works only in files created in V6R1.0 or later. See [[Adding a Date-Time Stamp field]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; There is no support in PQO/204 for the data/time stamp feature.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Difference between the system wide date-time stamp field and an UPDATE-TIME field====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Besides the obvious difference that the date-time stamp field will (and must) have the same name in every file in which it is used, the following are the notable differences between the two approaches:&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* The UPDATE-TIME attribute can be set to track updates to Repeating Field Groups, as well as at the record level.&lt;br /&gt;
* The UPDATE-TIME captures the time at the start of an update unit, the date-time stamp field captures the time at the commit point.&lt;br /&gt;
* The date-time stamp field updates may be [[#Suspending date-time stamp updates|temporarily suspended]].&lt;br /&gt;
&lt;br /&gt;
== Assigning Fields to Repeating Field Groups (RFGs) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FIELDGROUP attribute===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;No default, can be abbreviated as &#039;FG&#039;. FIELDGROUP is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FIELDGROUP attribute specifies the name of the field group that the&lt;br /&gt;
defined field is associated with (contained in). Once you define a FIELDGROUP&lt;br /&gt;
value for a field, you cannot redefine the FIELDGROUP value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FIELDGROUP attribute can not refer to a fieldgroupname that has not yet been defined to the file (the [[DEFINE FIELDGROUP command]] must occur before the [[DEFINE FIELD command]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Syntax===&lt;br /&gt;
:FIELDGROUP [fieldgroupname|*]&lt;br /&gt;
&lt;br /&gt;
The FIELDGROUP attribute does not allow:&lt;br /&gt;
&lt;br /&gt;
* Record security&lt;br /&gt;
* Use for SORT or HASH file&lt;br /&gt;
* 1NF file model&lt;br /&gt;
The FIELDGROUP attribute can be used with the STORE-NULL LITERAL&lt;br /&gt;
attribute.&lt;br /&gt;
&lt;br /&gt;
===Using FIELDGROUP * ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FIELDGROUP * attribute means that the field will be included into all&lt;br /&gt;
field groups. The EXACTLY-ONE attribute conflicts with the FIELDGROUP * attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Field Naming&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Field Naming ==&lt;br /&gt;
&lt;br /&gt;
The rules for field and fieldgroup naming are contained in [[Field Names]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Release_notes_for_Model_204_version_7.5&amp;diff=60755</id>
		<title>Release notes for Model 204 version 7.5</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Release_notes_for_Model_204_version_7.5&amp;diff=60755"/>
		<updated>2013-07-01T23:29:24Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Increased Table B record number capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These release notes list the enhancements and other changes contained in Model 204 version 7.5, &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;which is still in development&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;. &lt;br /&gt;
Until the commercial release of the software, Rocket reserves the right to add to, remove, or change anything described herein.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
These release notes contain installation and features information for the Rocket Model 204 version 7.5.0 release.&lt;br /&gt;
Before beginning your installation, please read through this information about product installation and changes.&lt;br /&gt;
&lt;br /&gt;
==New in this release==&lt;br /&gt;
This section summarizes the new features and enhancements for Model 204 version 7.5.0.&lt;br /&gt;
&lt;br /&gt;
===SOUL (User Language)===&lt;br /&gt;
The significantly enhanced, object-oriented, version of User Language is now called SOUL. All existing User Language programs will continue to work under SOUL, so User Language can be considered to be a subset of SOUL, though the name User Language is now deprecated.&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feature&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Operating System&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Sirius object-oriented language extensions integration&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;z/VM, z/OS, z/VSE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ECF statements can pass up to 60 parameters&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;z/VM, z/OS, z/VSE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===System Management===&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feature&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Operating System&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Writing records to the SMF data set without an SVC installed&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;z/VM, z/OS, z/VSE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Performance===&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Feature&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Operating System&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;GTBL can be stored above the bar&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;z/VM, z/OS, z/VSE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operating system requirements==&lt;br /&gt;
Requirements for Model 204 version 7.5.0 are still being determined.&lt;br /&gt;
&lt;br /&gt;
Model 204 version 7.4.0 required the following operating system support:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For IBM z/OS: Version 1 Release 7 is sufficient for all new functionality except for the following&lt;br /&gt;
features:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large (1 MB) page support requires Version 1 Release 9.&lt;br /&gt;
&amp;lt;li&amp;gt;Extended address volumes (EAV) requires Version 1 Release 12.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For IBM z/VM: Version 5 Release 4.0 or later&lt;br /&gt;
&amp;lt;li&amp;gt;For IBM z/VSE:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Version 5 Release 1 or&lt;br /&gt;
&amp;lt;li&amp;gt;Version 4 Release 3 or&lt;br /&gt;
&amp;lt;li&amp;gt;Version 4 Release 2.1 or&lt;br /&gt;
&amp;lt;li&amp;gt;Version 4 Release 2.0, with these program temporary fixes (PTFs) installed:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UD53436&lt;br /&gt;
&amp;lt;li&amp;gt;UD53437&lt;br /&gt;
&amp;lt;li&amp;gt;UD53438&lt;br /&gt;
&amp;lt;li&amp;gt;UD53439&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardware requirements ===&lt;br /&gt;
Requirements for Model 204 version 7.5.0 are still being determined.&lt;br /&gt;
&lt;br /&gt;
Model 204 version 7.4.0 required the IBM z/890 or above processor, except for the following feature:&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The large (1 MB) page support feature requires the IBM z10 or above processor. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Model 204 compatibility with operating systems===&lt;br /&gt;
Content in this section is still to be determined.&lt;br /&gt;
&lt;br /&gt;
===Model 204 compatibility with Connect*===&lt;br /&gt;
All supported versions of Connect* are compatible with Model 204 version 7.5.0.&lt;br /&gt;
However, CLOB/BLOB support requires Connect* version 7.4.0 or higher. Use of Connect* versions earlier than version 7.4.0 to SELECT, UPDATE, or INSERT CLOB/BLOB data will fail and might produce unexpected application behavior and/or return an error.&lt;br /&gt;
Connect* version 7.5.0 is compatible with versions of Model 204 that are earlier than version 7.5.0.&lt;br /&gt;
&lt;br /&gt;
==SOUL (User Language) enhancements==&lt;br /&gt;
Much of the substantial new and enhanced functionality described in the following subsections is available as a result of the acquisition of Sirius Software. The functionality that is the subject of the initial subsection, &amp;quot;Object oriented programming,&amp;quot; motivates the new name for User Language, SOUL, often thought of as Simple Objective User Language.&lt;br /&gt;
&lt;br /&gt;
===Object oriented programming===&lt;br /&gt;
As of version 7.5 of Model 204 (and backward compatible with existing User Language applications), the SOUL language is equipped with [http://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming] (sometimes abbreviated O-O) capabilities comparable or superior to other contemporary object oriented languages. Formerly contained in the [[Janus SOAP User Language Interface]], you can use [[Janus SOAP ULI essentials]] as a set of entry points to the extensive SOUL O-O documentation.&lt;br /&gt;
&lt;br /&gt;
===Record capacity increase===&lt;br /&gt;
in this version of Model 204, the record limit is increased from sixteen million records to forty-eight million records per file.&lt;br /&gt;
&lt;br /&gt;
===New SOUL statements===&lt;br /&gt;
{{Template:User Language statements}}&lt;br /&gt;
&lt;br /&gt;
===Non O-O enhancements in SOUL===&lt;br /&gt;
{{Template:User Language syntax enhancements}}&lt;br /&gt;
&lt;br /&gt;
===External Call Facility (ECF)===&lt;br /&gt;
EXTERNAL CALL statements can now pass more parameters.&lt;br /&gt;
The maximum number of parameters that can be passed in an EXTERNAL CALL statement has been increased from 40 to 60.&lt;br /&gt;
The maximum value setting for ECPSIZE is increased from 1310680 to 1966020 to accommodate the extra parameters.&lt;br /&gt;
===REPEAT statement UNTIL option===&lt;br /&gt;
The REPEAT statement now supports the UNTIL option. In previous releases, only REPEAT WHILE was supported.  &lt;br /&gt;
              &lt;br /&gt;
A REPEAT UNTIL enters the loop body prior to checking the condition.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example:&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following program results in output of &#039;1&#039;:         &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
BEGIN                                                                 &lt;br /&gt;
REPEAT WHILE %I EQ 0                                                  &lt;br /&gt;
 %I = %I + 1                                                          &lt;br /&gt;
 PRINT %I                                                             &lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;   &lt;br /&gt;
                                                                &lt;br /&gt;
However, the following program results in an endless print loop:         &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
BEGIN                                                                 &lt;br /&gt;
REPEAT UNTIL %I EQ 0                                                  &lt;br /&gt;
  %I = %I + 1                                                          &lt;br /&gt;
 PRINT %I                                                             &lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===New and changed classes and methods===&lt;br /&gt;
&lt;br /&gt;
====New HttpRequest TranslateTable property====&lt;br /&gt;
The [[TranslateTable (HttpRequest property)|TranslateTable HttpRequest property]] makes it possible to set the translate table to be used for EBCDIC to ASCII translation of data in an HttpRequest object.&lt;br /&gt;
&lt;br /&gt;
====New InvalidTranslateTable class====&lt;br /&gt;
Objects of the [[InvalidTranslateTable class|InvalidTranslateTable exception class]] are thrown when a requested system translate table cannot be found. It is currently thrown only by the [[TranslateTable (HttpRequest property)|TranslateTable HttpRequest property]].&lt;br /&gt;
&lt;br /&gt;
====New bit manipulation String functions====&lt;br /&gt;
New bit manipulation functions [[BitClearString (String function)|BitClearString]], [[BitCountString (String function)|BitCountString]], [[BitFlipString (String function)|BitFlipString]], [[BitSetString (String function)|BitSetString]], and [[BitValueString (String function)|BitValueString]] make it easier to manipulate the bits in a string.&lt;br /&gt;
&lt;br /&gt;
====New InvalidBitNumber class====&lt;br /&gt;
Objects of the [[InvalidBitNumber class|InvalidBitNumber exception class]] are thrown when an invalid bit number is requested by a bit manipulation function. It is currently thrown only by the &amp;lt;var&amp;gt;[[BitClearString (String function)|BitClearString]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;[[BitFlipString (String function)|BitFlipString]]&amp;lt;/var&amp;gt;, [[BitSetString (String function)|BitSetString]], and &amp;lt;var&amp;gt;[[BitValueString (String function)|BitValueString]]&amp;lt;/var&amp;gt; functions.&lt;br /&gt;
&lt;br /&gt;
====New option for AppendJournalData====&lt;br /&gt;
The &amp;lt;var&amp;gt;QT&amp;lt;/var&amp;gt; option is added to the &amp;lt;var&amp;gt;[[AppendJournalData_(Stringlist_function)#Options_parameter|AppendJournalData]]&amp;lt;/var&amp;gt; method, to include QT type audit entries.&lt;br /&gt;
&lt;br /&gt;
====New parameter for AddField====&lt;br /&gt;
The &amp;lt;var&amp;gt;Strip&amp;lt;/var&amp;gt; option is added to the &amp;lt;var&amp;gt;Screen&amp;lt;/var&amp;gt; class method &amp;lt;var&amp;gt;[[AddField (Screen function)|AddField]]&amp;lt;/var&amp;gt; to allow suppression of leading and trailing blank removal from input fields.&lt;br /&gt;
&lt;br /&gt;
===New and changed $functions===&lt;br /&gt;
&lt;br /&gt;
====Former Sirius $functions====&lt;br /&gt;
The $functions referred to by the link below are added to SOUL as a result of the acquisition of Sirius Software:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius $functions]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====$SNDMAIL attachment ASCII translation====&lt;br /&gt;
The $SNDMAIL function can now translate an attachment to ASCII before sending it. &lt;br /&gt;
This translation is useful if the $SNDMAIL attachment is a CLOB (CHARACTER-LARGE-OBJECT) such as a text document.&lt;br /&gt;
&lt;br /&gt;
The $SNDMAIL function now accepts an optional parameter after the name of the attached object. If this parameter is set to &#039;C&#039; (or to a percent variable with the value &#039;C&#039;), the object in the buffer is translated to ASCII before being attached to the email.&lt;br /&gt;
&lt;br /&gt;
If this parameter is not specified, the object in the buffer is sent as a binary object.&lt;br /&gt;
&lt;br /&gt;
In this example:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
 %RC = $SNDMAIL(%SUBJECT,,%BODY,%FROM,%TO,,,,&#039;CLOB.TXT&#039;,&#039;C&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
the CLOB.TXT attachment will be translated to ASCII before being attached to the email.&lt;br /&gt;
&lt;br /&gt;
==New products==&lt;br /&gt;
[[Sirius Software product list|These products]] are now available to Model 204 customers as separately purchased items as a result of the acquisition of Sirius Software.&lt;br /&gt;
&lt;br /&gt;
==File-related enhancements==&lt;br /&gt;
&lt;br /&gt;
===Repeating field groups===&lt;br /&gt;
[placeholder for long section to come from 7.2 rel notes]&lt;br /&gt;
===Increased Table B record number capacity===&lt;br /&gt;
Table B can now contain up to 48M possible record numbers. (The previous limit was 16M.)&lt;br /&gt;
&lt;br /&gt;
Set FILEORG=X&#039;200&#039; at file creation time to allow for the increased record numbers.&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Notes&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The limit for BSIZE remains at 16M. &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
BSIZE * BRECPPG must be less than or equal to 48M (actually decimal 50,331,648 to be exact).  &lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
For example, if BSIZE = 16M, BRECPPG cannot be more than 3.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
FILEORG=X&#039;200&#039; cannot be specified for files with hash key or sorted file organization.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==System management enhancements==&lt;br /&gt;
&lt;br /&gt;
===Writing records to the SMF data set===&lt;br /&gt;
Having Model 204 write records to the SMF data set no longer requires the installation of an SVC.&lt;br /&gt;
&lt;br /&gt;
Therefore, the &amp;lt;var&amp;gt;[[SMFSVC parameter|SMFSVC]]&amp;lt;/var&amp;gt; parameter is no longer required and, if present, will be ignored and flagged with the following informational message:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0204: PARAMETER SMFSVC OBSOLETE AND NOT RESET&amp;lt;/p&amp;gt;&lt;br /&gt;
However, the &amp;lt;var&amp;gt;[[SMFLORN parameter|SMFLORN]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[SMFSLRN parameter|SMFSLRN]]&amp;lt;/var&amp;gt; parameters must still be present in CCAIN if SMF records are required.&lt;br /&gt;
&lt;br /&gt;
==Performance enhancements==&lt;br /&gt;
&lt;br /&gt;
===GTBL in above the bar storage===&lt;br /&gt;
GTBL can now be placed into non-swappable server storage area above the bar.&lt;br /&gt;
In order to store GTBL in ATB storage:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increase the &amp;lt;var&amp;gt;[[SERVNSSZ parameter|SERVNSSZ]]&amp;lt;/var&amp;gt; parameter by the GTBL size.&lt;br /&gt;
&amp;lt;li&amp;gt;Set the second byte of the &amp;lt;var&amp;gt;[[SERVNSA parameter|SERVNSA]]&amp;lt;/var&amp;gt; parameter to &amp;lt;code&amp;gt;X’80’&amp;lt;/code&amp;gt;, so the value of &amp;lt;var&amp;gt;SERVNSA&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;X&#039;00800000&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
The settings for each server table above the bar are independent of each other.&lt;br /&gt;
So if both FTBL and GTBL are placed above the bar, then &amp;lt;var&amp;gt;SERVNSA&amp;lt;/var&amp;gt; should be set to &amp;lt;code&amp;gt;X&#039;02800000&#039;&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MQ/204 enhancements==&lt;br /&gt;
&amp;lt;b&amp;gt;Freeing MQ/204 subtasks and associated storage&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new MQDELDTP PST (pseudo subtask)  checks for MQ/204 subtasks that are in a delayed detach state. MQDELDTP detaches MQ/204 subtasks that have finished their work and releases their associated storage areas. &lt;br /&gt;
==Upward compatibility issues==&lt;br /&gt;
===INTERCOMM is no longer supported===&lt;br /&gt;
The INTERCOMM interface supports the use of Teletype and 3270 terminals in line-at-a-time mode, using the Model 204 IODEV=29 thread type.&lt;br /&gt;
&lt;br /&gt;
INTERCOMM is not supported in Model 204 version 7.5.&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 Terminal User&#039;s Guide&amp;lt;/var&amp;gt; for a discussion of terminal interfaces.&lt;br /&gt;
&lt;br /&gt;
==New and changed commands==&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
     ******************************************************************&lt;br /&gt;
     Please keep the following subsections alphabetized by command name&lt;br /&gt;
     ******************************************************************&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFINE FIELD new COMMA option===&lt;br /&gt;
The &amp;lt;var&amp;gt;[[DEFINE FIELD command#comma|COMMA]]&amp;lt;/var&amp;gt; option on the &amp;lt;var&amp;gt;DEFINE FIELD&amp;lt;/var&amp;gt; command uses commas to separate displayed field attributes.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
     *************************************************************************************&lt;br /&gt;
     End of new/changed command subsections; please keep them alphabetized by command name&lt;br /&gt;
     *************************************************************************************&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==New and changed parameters==&lt;br /&gt;
In addition to the following specific parameter changes, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; parameter descriptions, for example as displayed by the &amp;lt;var&amp;gt;VIEW&amp;lt;/var&amp;gt; command, are now in mixed case (unless translated to uppercase due to &amp;lt;var&amp;gt;[[#UPCASMSG new parameter|UPCASMSG]]&amp;lt;/var&amp;gt;.)&lt;br /&gt;
&amp;lt;!-- &lt;br /&gt;
     ********************************************************************&lt;br /&gt;
     Please keep the following subsections alphabetized by parameter name&lt;br /&gt;
     ********************************************************************&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ECPSIZE max value increase===&lt;br /&gt;
The maximum value setting for ECPSIZE has been increased from 1310680 to 1966020 to accommodate more [[Release_notes_for_Model_204_version_7.5_(DRAFT)#External_Call_Facility_.28ECF.29|External Call Facility]] parameters.&lt;br /&gt;
===FILEORG change===&lt;br /&gt;
The [[FILEORG_parameter|FILEORG]] X&#039;100&#039; setting for enhanced data handling files is available as of Model 204 version 7.5. &lt;br /&gt;
&lt;br /&gt;
X&#039;100&#039; enables a number of enhancements to the file structure, including support for [[Support_for_repeating_field_groups|physical field groups]]; the definition of up to 32000 fields in a file; system maintained [[Field_Design_(File_Management)#Automatic_Fields|Automatic fields]]; [[Field_Design_(File_Management)#Field_Constraints|Field Constraints]] providing content validation; and improved space management of fields containing [[Field_Design_(File_Management)#BLOB.2C_CLOB_and_MINLOBE_attributes|Large Objects]]. &lt;br /&gt;
&lt;br /&gt;
If X&#039;100&#039; is selected, the X&#039;80&#039; bit (optimized field extraction files) is automatically set.&lt;br /&gt;
&lt;br /&gt;
===MODTIM parameter (new)===&lt;br /&gt;
The &amp;lt;var&amp;gt;[[MODTIM parameter|MODTIM]]&amp;lt;/var&amp;gt; system parameter displays the most recent assembly date and time of the Model 204 load module. &lt;br /&gt;
&lt;br /&gt;
===OUTPUT=DUMMY for IODEV=3 threads===&lt;br /&gt;
IODEV=3 threads definitions now allow OUTPUT=DUMMY.&lt;br /&gt;
When defining IODEV=3 threads, if output is not required, the OUTPUT parameter can be coded as OUTPUT=DUMMY. &lt;br /&gt;
&amp;lt;p&amp;gt;For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IODEV=3,INPUT=IOD3IN1,OUTPUT=DUMMY&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means that no DD statement is required for the output data set, and in cases where many&lt;br /&gt;
IODEV=3 threads are defined to simulate a large number of users, this enhancement will reduce the number of DD statements required by one half.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===RETRVKEY parameter change===&lt;br /&gt;
New in this release, if you specify a non-zero setting of &amp;lt;var&amp;gt;[[RETRVKEY parameter|RETRVKEY]]&amp;lt;/var&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have set the &amp;lt;code&amp;gt;X&#039;01&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;X&#039;10&#039;&amp;lt;/code&amp;gt; bits of the &amp;lt;var&amp;gt;[[RETRVOPT parameter|RETRVOPT]]&amp;lt;/var&amp;gt; parameter, you can use a&lt;br /&gt;
&amp;lt;i&amp;gt;forward&amp;lt;/i&amp;gt; retrieve PF key, in addition to the &amp;lt;i&amp;gt;backward&amp;lt;/i&amp;gt; retrieve PF key specified by &amp;lt;var&amp;gt;RETRVKEY&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; &lt;br /&gt;
If either of these bits is set, the &amp;lt;code&amp;gt;X&#039;02&#039;&amp;lt;/code&amp;gt; bit is strongly recommended as well.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The size of the allocated storage area, and hence the number and length of input lines available for retrieval, is specified&lt;br /&gt;
by the value of the &amp;lt;var&amp;gt;[[RETRVBUF parameter|RETRVBUF]]&amp;lt;/var&amp;gt; parameter.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SESMAXTO parameter (new)===&lt;br /&gt;
The &amp;lt;var&amp;gt;[[SESMAXTO parameter|SESMAXTO]]&amp;lt;/var&amp;gt; parameter can be used limit the maximum session timeout value or to cause all current closed sessions to be immediately discarded.&lt;br /&gt;
&lt;br /&gt;
===UPCASMSG parameter (new)===&lt;br /&gt;
The &amp;lt;var&amp;gt;[[UPCASMSG parameter|UPCASMSG]]&amp;lt;/var&amp;gt; parameter can be used to translate messages issued by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; to uppercase; otherwise (depending on the message being issued) they are displayed in mixed (upper and lower) case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ***************************************************************************************** --&amp;gt;&lt;br /&gt;
&amp;lt;!-- End of new/changed parameter subsections; please keep them alphabetized by parameter name --&amp;gt;&lt;br /&gt;
&amp;lt;!-- ***************************************************************************************** --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==New and updated messages==&lt;br /&gt;
&#039;&#039;&#039;M204.0141: &lt;br /&gt;
&amp;lt;br&amp;gt;BUG .. DUPLICATE FILE NAME IN CP RECORD&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A duplicate file name was encountered while attempting to add a deferred update dataset to the file directory during recovery. This indicates a potential problem in the Model 204 software.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Contact Customer Support with the following documentation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Audit trail from the previous run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Journal from the previous run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 4 AD OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.0204:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PARAMETER SMFSVC OBSOLETE AND NOT RESET&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Writing records to the SMF data set no longer requires the installation of an SVC. The&lt;br /&gt;
SMFSVC parameter is therefore obsolete and cannot be reset.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; No response required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Messages M204.0332 and M204.0336 indicate problems with the CRAM interface. &lt;br /&gt;
The visibility of these messages has been improved by:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;writing the message to the operator and the JESLOG&lt;br /&gt;
&amp;lt;li&amp;gt;writing the message as an ER line in CCAAUDIT&lt;br /&gt;
&amp;lt;li&amp;gt;setting the return code to 80&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.0332:&lt;br /&gt;
&amp;lt;br&amp;gt;RC &#039;&#039;nn&#039;&#039; FROM CRFS OPEN&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The run has failed to initialize due to problems with the CRAM interface.&lt;br /&gt;
The possible formats of this message are:&lt;br /&gt;
&lt;br /&gt;
Format 1: RC nn FROM CRFS OPEN/PUT/GET&lt;br /&gt;
&lt;br /&gt;
Format 2: ECB postcode FROM CRFS PUT/GET&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 1 indicates that Model 204 module CRFS attempted to open channel, send a message down the channel, or receive a message from a channel. CRAM was unable to satisfy the request. The message states the return code and the&lt;br /&gt;
operation attempted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 2 indicates that Model 204 module CRFS received an unexpected post code from CRAM while attempting an I/O operation on a channel. The message states the post code and the operation attempted.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Contact Technical Support and have the audit trail available.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 80 80 AUDITER NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.0336:&lt;br /&gt;
&amp;lt;br&amp;gt;RC &#039;&#039;nn&#039;&#039; FROM CRIO OPEN&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The run has failed to initialize due to problems with the CRAM interface.&lt;br /&gt;
The possible formats of this message are:&lt;br /&gt;
&lt;br /&gt;
Format 1: RC nn FROM CRIO OPEN/PUT/GET&lt;br /&gt;
&lt;br /&gt;
Format 2: ECB postcode FROM CRFS PUT/GET&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 1 indicates that Model 204 module CRIO attempted to open a channel,&lt;br /&gt;
send a message down a channel, or receive a message from a channel. CRAM&lt;br /&gt;
was unable to satisfy the request. The message states the return code and the&lt;br /&gt;
operation attempted. For example, the return code 16 indicates that the CRAM&lt;br /&gt;
channel is already open.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 2 indicates that Model 204 module CRFS received an unexpected post&lt;br /&gt;
code from CRAM while attempting an I/O operation on a channel. The message&lt;br /&gt;
shows the post code and the operation attempted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Contact Technical Support and have the audit trail available.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 80 80 AUDITER NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.0434:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NJBUFF SET TO %C&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; &amp;lt;i&amp;gt;TBD&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.0790:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
FILE TOO BIG&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The total number of records possible in Table B exceeds 342 segments for files that do not have the FILEORG X&#039;200&#039; bit set and 1024 segments for files that have the FILEORG X&#039;200&#039; bit set.                           &lt;br /&gt;
The number of potential record numbers per segment is 49,152.             &lt;br /&gt;
The number of possible segments in Table B is calculated by the following formula:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
((BSIZE * BRECPPG) / 49,152)) + (1 if remainder not 0)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
If the result exceeds 342 or 1024 respectively too many segments result and MODEL 204 rejects the CREATE command. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Make the file smaller (by specifying a smaller BSIZE or smaller BRECPPG), or divide the file into smaller pieces and use the file group feature to process them as a single logical file.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.0797:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
BSIZE*BRECPPG EXCEEDS MAXIMUM VALUE&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The product of BSIZE and BRECPPG must not exceed 16,777,216 for regular Model 204 files (which do not have the FILEORG X&#039;200&#039; bit set) and 50,331,648 for files that have the FILEORG X&#039;200&#039; bit set. These numbers specify the maximum number of records allowed in a single Model 204 file. &lt;br /&gt;
&lt;br /&gt;
The CREATE or INCREASE command is rejected.        &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Retry the command, specifying values for BSIZE and BRECPPG so that BSIZE*BRECPPG does not exceed the limit. Refer to the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt; Rocket Model 204 File Manager&#039;s Guide&amp;lt;/var&amp;gt; for more information on file sizes.                                                                      &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.1052:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
LOUTPB %C TO %C&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039;&lt;br /&gt;
LOUTPB has been increased or decreased, to the value given in the message.&lt;br /&gt;
With a full-screen terminal the value is 1.5 times the minimum for that model number, rounded&lt;br /&gt;
up to a multiple of 8.&lt;br /&gt;
A model 2 terminal results in a LOUTPB of 3200.&lt;br /&gt;
A model 5 terminal results in a LOUTPB of 5664.&lt;br /&gt;
&amp;lt;p&amp;gt;If NBKPG is greater than 0, the largest allowable value for LOUTPB is PAGESZ&lt;br /&gt;
minus 40, so the value can be decreased for this reason.&amp;lt;/p&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Response:&#039;&#039;&#039; No response is needed. This message is for information only.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITAD&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.1131:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CAN&#039;T &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;action&amp;lt;/var&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The procedure action cannot be taken for one of the following reasons:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The procedure is in use by another user.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The procedure is not in the file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user does not have the correct privileges to change the procedure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a RENAME or ASSIGN has been attempted, the alias might already exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; Make sure that the procedure name is spelled correctly.&lt;br /&gt;
If the named procedure is in use, retry the command when the procedure is no longer in use.  Otherwise, arrange to place the&lt;br /&gt;
procedure in the file or to obtain the privileges to change the procedure.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 SUFFIX AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1260: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[FIELD | FIELDGROUP] WAS PREVIOUSLY DEFINED WITH DIFFERENT ATTRIBUTES, NEW [FIELD | FIELDGROUP] OPTIONS IGNORED&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A DEFINE [FIELD | FIELDGROUP] command has attempted to define an existing field with different attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; If you wish to redefine the attributes of the field, you must issue the REDEFINE [FIELD | FIELDGROUP] command. Notify your file manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.1307: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
%C LOGON REJECTED - &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason text&amp;lt;/var&amp;gt; (REASON CODE: %X)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The MODEL 204 3270 terminal handler has rejected a logon request from a 3270 terminal for the reason stated. The following reason codes are defined:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There are no control blocks available for new logons. Increase the number of IODEV 7 terminal definitions. The reason text is: NOT ENOUGH 3270 TERMINALS.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal has been defined with a non-3270 transmission services profile. The LU type must be 2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The reason text is: LU TYPE NOT = 2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal has been defined to require definite responses to messages it sends inbound to the host. The transmission services profile must be 3. The reason text is: TS PROFILE NOT = 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There has been an error on this terminal. This is a retryable error. The reason text is: LOSTERM SET FOR THIS TERMINAL.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal definition is in use. This error should not occur. The reason text is: TERMINAL ALREADY IN USE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Contact your VTAM systems programmer to correct the VTAM definition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 4 AD SAVE NOTERM OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1346: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
SERVER AREA GREATER THAN CYLINDER CAPACITY FOR THIS DEVICE. CYLINDER SIZE = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; BYTES.                                                &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt;                                                                    &lt;br /&gt;
The number of bytes specified for the largest server area (SERVSIZE)      &lt;br /&gt;
is greater than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;, the number of bytes contained in a cylinder for    &lt;br /&gt;
the type of disk device on which your CCASERVR (CCASRVR for DOS) data set resides.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Do one of the following:                                                  &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ensure that the largest SERVSIZE value does not exceed &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;           &lt;br /&gt;
&amp;lt;li&amp;gt;place your server data sets on a type of disk device that has a         &lt;br /&gt;
larger cylinder capacity&amp;lt;/li&amp;gt;                                                  &lt;br /&gt;
&amp;lt;li&amp;gt;place CCASERVR in storage (see the &amp;quot;CCASERVR in Storage feature&amp;quot; section in the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 System Manager&#039;s Guide&amp;lt;/var&amp;gt;).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 96 96 AUDITER      &lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1393:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CHUNK clause not of format &amp;quot;CHUNK &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkSize&amp;lt;/var&amp;gt; FOR &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkTarget&amp;lt;/var&amp;gt;&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the syntax of the CHUNK clause was not in the format shown in this message.                                                   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the incorrect CHUNK clause syntax.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.1394:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CHUNK &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkSize&amp;lt;/var&amp;gt; VALUE INVALID: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the value specified for the size of a CHUNK is invalid;  &lt;br /&gt;
&amp;quot;reason&amp;quot; indicates why. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK size.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1395:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CHUNK target is not VISIBLE ORDERED NUMERIC&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the field specified as a CHUNK target is not VISIBLE ORDERED NUMERIC, which is a requirement of chunk fields. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK target type.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1396:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
CHUNK fields must be INVISIBLE ORDERED NUMERIC&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, an attempt was made to create a CHUNK field that was not INVISIBLE ORDERED NUMERIC, which is a requirement of chunk fields. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK target type.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1397:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
A CHUNK field was defined, %F may no longer be opened with M204 releases prior to V7R5&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; This is an informational message. No action is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1489: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOT ENOUGH FILE SPACE TO CONTINUE PROCEDURE DEFINITION - %F&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; There is no room in the file to store the procedure being entered with the PROCEDURE command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;If…&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Then Model 204…&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Error occurs after the first line of procedure text has been stored&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Keeps the partial procedure&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;You are entering the text at your terminal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Ends procedure definition immediately&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Procedure text is supplied by another procedure&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Flushes the remainder of the input&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Procedure text is supplied in a batch input stream (CCAIN)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Flushes the remainder of the procedure text and resumes processing after the END PROCEDURE command&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Create space in the file by deleting unwanted procedures or increasing Table D with the INCREASE command. Replace the partial procedure using the PROCEDURE command, or use the EDIT command to supply the missing text.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.1938: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REQUEST FOR SPACE IN TABLE E EXTENDS BEYOND EHIGHPG, BIT MAP PAGES ARE SCANNED FOR FREESPACE&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A User Language request attempted to store a large object and all of the append pages in Table E have been allocated. Model 204 must scan the bit map pages for previously allocated Table E pages to look for free space to store the large object.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;File manager response:&amp;lt;/b&amp;gt; The file should be reorganized to compact fragmented Table E space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; I 0 0&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2126:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;USER&#039;S PUSHDOWN LIST OVERFLOWED&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The user&#039;s pushdown list is an internal stack for maintaining state information for user threads across internal Model 204 subroutines. The user pushdown list lives in each user&#039;s server.  Its size requirement depends on the complexity of the command or User Language request.&lt;br /&gt;
&lt;br /&gt;
This message is issued whenever Model 204 detects that pushdown list data has spilled into adjacent control structures.  Because of potential corruption the user is restarted.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Increase the size of the user pushdown list by using the LPDLST parameter of the UTABLE command.  Notify your system manager.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; If this becomes a frequent occurrence, consider more permanent changes to LPDLST and SERVSIZE, since the pushdown list is a server component.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2329: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
subsystem &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;name&amp;lt;/var&amp;gt; AT &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;location name&amp;lt;/var&amp;gt; UNAVAILABLE&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The indicated subsystem at the specified node is not available for use due to one or more errors occurring at the specified node during start or login processing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify the system manager or try again later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; If the subsystem is started, stop the subsystem and resolve communications errors or other errors which occurred at the specified node. After resolving error, use the START SUBSYSTEM command to make the subsystem available for general use. Check to make sure that the LOCATION parameter was set properly in the CCAIN input stream for the Online.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2551:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039; {FPL|FCT PG1} IS INVALID FOR FILE: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; If the message says FPL, then the FPL (file parameter list) for the associated file is invalid. This could be the result of an incorrect DD, FILEDEF or DLBL statement.                                              &lt;br /&gt;
&lt;br /&gt;
If the message says FCT PG1, then the existence page array page is invalid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; If the DD, FILEDEF or DLBL statement is correct and points to the correct data set, then the file must be restored from a backup.         &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2651: &lt;br /&gt;
&amp;lt;br&amp;gt;NOT ALL THREADS PROCESSED FOR IODEV %C&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The run is terminated because either:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of threads specified by NUSERS has been initialized, but there are fewer users of the specified IODEV type than expected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DUPTERM number specified by the IODEV card could not be initialized because it exceeded the number of NUSERS.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Check that NUSERS matches the total of the listed IODEVs, plus one extra for USER 0. Check also the NOTERM/DUPTERM parameter for the specified IODEV card.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 80 80 ER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2719: &lt;br /&gt;
&amp;lt;br&amp;gt;OPEN %C FAILED. UPDATE STATEMENTS ALREADY COMPILED, READ ONLY PRIVILEGES INSUFFICIENT&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The OPEN or OPENC User Language statement was issued from a request to reopen a file with read-only privileges. However, that request had already been compiled with update statements against the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; In a User Language request, you cannot use the User Language OPEN or OPENC statement to reopen a file with read-only privileges, if that request contains updates statements against the same file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2739: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
PARAMETER &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; CANNOT BE RESET ON USER 0’S PARAMETER LINE: VALUE IGNORED&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; You reset parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; on the User 0 parameter line, but the parameter cannot be set there. The value is ignored, the default value for this parameter remains in effect.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Remove &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; from the User 0 parameters, since it will not change the value of the parameter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; E 0 4 AD&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2746: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
XSIZE*XRECPPG MAY NOT BE 1 NOR EXCEED 536870911&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The product of XSIZE and XRECPPG must not exceed 16777216 times 32 minus one, or 536870911. This specifies the maximum number of extension records allowed in a single Model 204 file when using Table X. Also, setting both XRECPPG and XSIZE to 1 is invalid.&amp;lt;/p&amp;gt;&lt;br /&gt;
The CREATE command is rejected.&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Retry the command specifying values for XSIZE and XRECPPG whose product does not exceed the 526870911 limit. Refer to the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 File Manager’s Guide &amp;lt;/var&amp;gt;for more information on file sizes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2826:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;%F VERSION IS PRE 6.3. COMPACTION NOT ALLOWED&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; An attempt was made to compact a file created prior to Model 204 version 6.3.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Reorganize the file using Model 204 version 6.3.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2831: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
UPDATES TO DTS FILES NOT SUPPORTED IN THIS ENVIRONMENT&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; DTS files cannot be updated in IFAM, SQL, or PQO environments.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Do not attempt to update DTS file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
&#039;&#039;&#039;M204.2833: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
FIELDS CANNOT BE DEFINED IN A FILE WITH ATRPG*ASTRPPG&amp;amp;gt;4000&lt;br /&gt;
&amp;lt;p&amp;gt;Return Codes: C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2836:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;VALUE OF PARAMETER %C INVALID—RESET TO %C&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This is an informational message only.&lt;br /&gt;
&lt;br /&gt;
A parameter was specified with an incorrect value. It has been reset to an internally calculated value that will accommodate other parameter settings. See the description of the parameter named to see what that calculation involves.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; The parameter has been reset. No response required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2838: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
%C ONLY VALID IN FILEORG X’100’ FILES&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2839: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
%C IS A %C, NOT A %C&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
&#039;&#039;&#039;M204.2841: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
REMOTE FIELDGROUPS NOT SUPPORTED &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
&#039;&#039;&#039;M204.2842:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
INVALID CONTEXT FOR FIELDGROUP&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----									&lt;br /&gt;
&#039;&#039;&#039;M204.2843: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
MAXIMUM FIELDGROUP ID EXCEEDED IN RECORD %R IN %F&lt;br /&gt;
&amp;lt;p&amp;gt;Return Codes: C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----								&lt;br /&gt;
&#039;&#039;&#039;M204.2844: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
MIX OF FIELDS AND FIELDGROUPS, NAME =&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2845: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
INVALID FIELDGROUP CONTEXT FOR %C&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The $function was used outside of field group context.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt;C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2846: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
INVALID FIELDGROUP CONTEXT FOR %C&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2847: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
FIELDGROUP CONTEXT LOST IN RECORD %R IN %F&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2848: INVALID FIELDGROUP ID: %C&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2849: REQUIRED KEYWORD %C MISSING&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;X 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2850: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
%C VALUE MISSING&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2851: &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
%C VALUE &amp;amp;quot;%C&amp;amp;quot; TOO BIG, MUST BE &amp;amp;lt;%C BYTES&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2852: UPDATE TO MISSING FIELDGROUP OCCURRENCE IN RECORD %R IN %F&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2853: %C NOT ALLOWED FOR EXACTLY-ONE FIELD&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2854: ATTEMPT TO DO %C FOR EXACTLY-ONE FIELD: %C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2855: FIELD DEPTH+LENGTH UNREPRESENTABLE IN RECORD %R IN %F&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2856: FIELDNAME VARIABLE %C: EXPECTED %C, GOT %C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2857: %C FIELD NOT ALLOWED FOR %C FIELD&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2858: FIELDGROUP CONTEXT MISMATCH BETWEEN COUNTOCCURRENCES- OF FIELD AND COUNTED FIELD&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2859: NEW AUTOMATIC FIELD NOT ALLOWED FOR NON-EMPTY FILE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2860: FIELD %C ALREADY HAS A COUNT-OCCURRENCES-OF FIELD&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2861: OCCURRENCE COUNTER %C OVERFLOWED&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2862: ATTEMPT TO UPDATE AUTOMATIC FIELD %C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2863: ATTEMPT TO DO %C FOR AUTOMATIC FIELD: %C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2865:CANCELATTEMPT TO %C INVALID DATETIME VALUE: %C = %C&amp;amp;#39; &amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
											&lt;br /&gt;
&amp;lt;b&amp;gt;2866: FILE ALREADY HAS %C FIELD&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
&amp;lt;b&amp;gt;2867: FIELDGROUP %C ALREADY HAS %C FIELD&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; If you try to define a second update tracker field of the same type for the same field group, you will invoke message 2867, where %C represents:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C O 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;2868: MINLOBE MUST BE BETWEEN 0 AND %C&amp;amp;#39;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2869:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;CHANGE REFUSED: MINLOBE &amp;gt; 0 FOR %F FIELD %C&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2870:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;CHANGE REFUSED: MINLOBE &amp;gt; 0 FOR %F FIELD %C&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL AUDITER&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;b&amp;gt;2871: FIELDGROUP CONTEXT MISMATCH BETWEEN CONCATENATION-OF FIELD AND COMPONENT FIELD&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2872: CONCATENATION VALUE TOO LONG FOR FIELD %C&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2873: CONCATENATION FIELD %C COMPONENT FIELD %C CONTAINS SEPARATOR CHARACTER&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2874: ATTEMPT TO %C A VALUE THAT&amp;amp;#39;S %C: %C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2875: CONCATENATION LIST INVALID: %C&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2876: INVALID %C VALUE: %C&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2877: WITH CLAUSE INVALID: %C&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: C 0 4 ECHO&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt; 2878: WITH CLAUSE INVALID: FIELD %C IN %F %C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2879: REMOTE ID %C MODE %C&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: I 0 0 SAVE NOTERM OPR&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2880: MEMORY DATASETS CANNOT BE PART OF MULTI-DATASET FILE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: C 0 4&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2881: DATA CONVERSION ERROR&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;2882: RECOVERY JOURNAL VERSION %X IS NOT SUPPORTED&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt;E 0 4 OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
									&lt;br /&gt;
&amp;lt;b&amp;gt;2884: [FIELD | FIELDGROUP] WAS PREVIOUSLY DEFINED AS A [FIELDGROUP | FIELD], NEW DEFINITION IGNORED&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
&amp;lt;b&amp;gt;2885: INVALID FIELDGROUP ID: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldgroup&amp;lt;/var&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
&amp;lt;b&amp;gt;2886: FIELDGROUP ID %C ALREADY EXISTS IN RECORD %R IN %F&amp;amp;#39;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
									&lt;br /&gt;
&amp;lt;b&amp;gt;2903: FILEORG=X&amp;amp;#39;100&amp;amp;#39; IS NOT SUPPORTED DURING FLOD/FILELOAD&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 8&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2933:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;&#039;Module version mismatch, KOMM=%C, %C=% C&#039;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 SNAP&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;M204.2934:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;FILEORG X&amp;lt;nowiki&amp;gt;&#039;&#039;200&#039;&#039;&amp;lt;/nowiki&amp;gt; not supported for hashed or sorted file organizations&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Hashed or sorted files must be 16M files. The CREATE FILE command   &lt;br /&gt;
is rejected. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Remove the conflicting FILEORG parameter and reissue CREATE FILE.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.2935:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;{CHUNK|CHUNK target} FIELDS MAY NOT BE RENAMED OR DELETED&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Do not attempt to RENAME or DELETE chunks or chunk targets.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.2936:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;A CHUNK FIELD OF SIZE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; ALREADY EXISTS FOR THIS FIELD&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; For a given CHUNK target field, duplicate chunk sizes are not permitted. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Correct the DEFINE FIELD that caused the message.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.2937:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;CHUNK SIZE: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; IS NOT AN INTEGRAL MULTIPLE/DIVISOR OF THE EXISTING CHUNK SIZE: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; A CHUNK field&#039;s chunk size must be an integral multiple/divisor of all other chunk&#039;s sizes for a given chunk target.  &lt;br /&gt;
&amp;lt;br&amp;gt;This message identifies the existing chunk size that conflicts with the new one.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Correct the DEFINE FIELD that caused the message.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;M204.2938:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;YOU MAY NOT DEFINE MORE THAN 20 CHUNKS FOR A FIELD &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; A given chunk target can have at most 20 chunks defined. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File Manager Response:&#039;&#039;&#039; Do not try to define more than 20 CHUNK fields for any given CHUNK target field.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 release notes|Model 204 7.5]]&lt;br /&gt;
[[Category:Release notes|Model 204 7.5 ]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_value_pairs_(File_architecture)&amp;diff=60480</id>
		<title>Field value pairs (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_value_pairs_(File_architecture)&amp;diff=60480"/>
		<updated>2013-06-21T04:15:13Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* FLOAT fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The basic unit of storage inside a Model 204 record is the field value pair (or, more literally, &amp;quot;field = value pair&amp;quot;). A record or a fieldgroup contains a series of fieldgroups and field value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A record can contain field value pairs for fields with the &amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; attribute, which are described [[??]].&lt;br /&gt;
&lt;br /&gt;
A record or a fieldgroup can contain non-&amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; field value pairs, whose physical structure is described below, for each storage data type.&lt;br /&gt;
&lt;br /&gt;
== STRING fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The field value pair for &amp;lt;var&amp;gt;STRING&amp;lt;/var&amp;gt; fields contains three parts: &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 3 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 2 bytes for all others.&lt;br /&gt;
* the length of the value for this pair (0 to 255); 1 byte.&lt;br /&gt;
* the value; variable length 0-255 bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, if you have a NAME field containing &#039;SMITH&#039; it will be held in either 8 or 9 bytes (depending on the FILEORG), while a NAME of &#039;FRANKENSTEIN&#039; will be held as either 15 or 16.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BINARY or CODED fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;[[Field Design (File Management)#BINARY attribute|BINARY]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[Field Design (File Management)#CODED attribute|CODED]]&amp;lt;/var&amp;gt; fields are stored differently depending on whether the file has the Optimized Field Extraction ([[FILEORG parameter|FILEORG]] x&#039;80&#039;) bit set.  Note that [[FILEORG parameter|FILEORG]] X&#039;100&#039; files automatically also turn on x&#039;80&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For non Optimized Field Extraction Files (x&#039;80) the field value pair contains two parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4 bytes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Optimized Field Extraction Files the field value pair contains three parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 3 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 2 byte for all others.&lt;br /&gt;
* the length of the value for this pair (1 to 4); 1 byte.&lt;br /&gt;
* the value (variable length, 1-4 bytes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By storing a length with &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; field occurrences, data in records can be read much faster. The possible tradeoff on performance versus space is discussed in [[File Design (File Management) Optimized Field Extraction Files|File Design]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FLOAT fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;[[Field Design (File Management)#FLOAT attribute|FLOAT]]&amp;lt;/var&amp;gt; fields are stored differently depending on whether the file has the Optimized Field Extraction ([[FILEORG parameter|FILEORG]] x&#039;80&#039;) bit set.  Note that [[FILEORG parameter|FILEORG]] X&#039;100&#039; files automatically also turn on x&#039;80&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For non Optimized Field Extraction Files the field value pair contains two parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4, 8, or 16 bytes, depending on the &amp;lt;var&amp;gt;LENGTH&amp;lt;/var&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Optimized Field Extraction Files the field value pair contains three parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 3 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 2 byte for all others.&lt;br /&gt;
* the length of the value for this pair (1 to 4); 1 byte.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4, 8, or 16 bytes, depending on the &amp;lt;var&amp;gt;LENGTH&amp;lt;/var&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By storing a length with &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; field occurrences, data in records can be read much faster. The possible tradeoff on performance versus space is discussed in [[File Design (File Management) Optimized Field Extraction Files|File Design]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_value_pairs_(File_architecture)&amp;diff=60479</id>
		<title>Field value pairs (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_value_pairs_(File_architecture)&amp;diff=60479"/>
		<updated>2013-06-21T04:13:32Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* BINARY or CODED fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The basic unit of storage inside a Model 204 record is the field value pair (or, more literally, &amp;quot;field = value pair&amp;quot;). A record or a fieldgroup contains a series of fieldgroups and field value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A record can contain field value pairs for fields with the &amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; attribute, which are described [[??]].&lt;br /&gt;
&lt;br /&gt;
A record or a fieldgroup can contain non-&amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; field value pairs, whose physical structure is described below, for each storage data type.&lt;br /&gt;
&lt;br /&gt;
== STRING fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The field value pair for &amp;lt;var&amp;gt;STRING&amp;lt;/var&amp;gt; fields contains three parts: &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 3 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 2 bytes for all others.&lt;br /&gt;
* the length of the value for this pair (0 to 255); 1 byte.&lt;br /&gt;
* the value; variable length 0-255 bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, if you have a NAME field containing &#039;SMITH&#039; it will be held in either 8 or 9 bytes (depending on the FILEORG), while a NAME of &#039;FRANKENSTEIN&#039; will be held as either 15 or 16.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BINARY or CODED fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;[[Field Design (File Management)#BINARY attribute|BINARY]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[Field Design (File Management)#CODED attribute|CODED]]&amp;lt;/var&amp;gt; fields are stored differently depending on whether the file has the Optimized Field Extraction ([[FILEORG parameter|FILEORG]] x&#039;80&#039;) bit set.  Note that [[FILEORG parameter|FILEORG]] X&#039;100&#039; files automatically also turn on x&#039;80&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For non Optimized Field Extraction Files (x&#039;80) the field value pair contains two parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4 bytes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Optimized Field Extraction Files the field value pair contains three parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 3 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 2 byte for all others.&lt;br /&gt;
* the length of the value for this pair (1 to 4); 1 byte.&lt;br /&gt;
* the value (variable length, 1-4 bytes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By storing a length with &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; field occurrences, data in records can be read much faster. The possible tradeoff on performance versus space is discussed in [[File Design (File Management) Optimized Field Extraction Files|File Design]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FLOAT fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;[[Field Design (File Management)#FLOAT attribute|FLOAT]]&amp;lt;/var&amp;gt; fields are stored differently depending on whether the file has the Optimized Field Extraction ([[FILEORG parameter|FILEORG]] x&#039;80&#039;) bit set.  Note that [[FILEORG parameter|FILEORG]] X&#039;100&#039; files automatically also turn on x&#039;80&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For non Optimized Field Extraction Files the field value pair contains two parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4, 8, or 16 bytes, depending on the &amp;lt;var&amp;gt;LENGTH&amp;lt;/var&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Optimized Field Extraction Files the field value pair contains three parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the length of the value for this pair (1 to 4); 2 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 1 byte for all others.&lt;br /&gt;
* the value (variable length, 1-4 bytes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By storing a length with &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; field occurrences, data in records can be read much faster. The possible tradeoff on performance versus space is discussed in [[File Design (File Management) Optimized Field Extraction Files|File Design]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_value_pairs_(File_architecture)&amp;diff=60478</id>
		<title>Field value pairs (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_value_pairs_(File_architecture)&amp;diff=60478"/>
		<updated>2013-06-21T03:55:39Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The basic unit of storage inside a Model 204 record is the field value pair (or, more literally, &amp;quot;field = value pair&amp;quot;). A record or a fieldgroup contains a series of fieldgroups and field value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A record can contain field value pairs for fields with the &amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; attribute, which are described [[??]].&lt;br /&gt;
&lt;br /&gt;
A record or a fieldgroup can contain non-&amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; field value pairs, whose physical structure is described below, for each storage data type.&lt;br /&gt;
&lt;br /&gt;
== STRING fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The field value pair for &amp;lt;var&amp;gt;STRING&amp;lt;/var&amp;gt; fields contains three parts: &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 3 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 2 bytes for all others.&lt;br /&gt;
* the length of the value for this pair (0 to 255); 1 byte.&lt;br /&gt;
* the value; variable length 0-255 bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, if you have a NAME field containing &#039;SMITH&#039; it will be held in either 8 or 9 bytes (depending on the FILEORG), while a NAME of &#039;FRANKENSTEIN&#039; will be held as either 15 or 16.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BINARY or CODED fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;[[Field Design (File Management)#BINARY attribute|BINARY]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[Field Design (File Management)#CODED attribute|CODED]]&amp;lt;/var&amp;gt; fields are stored differently depending on whether the file has the Optimized Field Extraction ([[FILEORG parameter|FILEORG]] x&#039;80&#039;) bit set.  Note that [[FILEORG parameter|FILEORG]] X&#039;100&#039; files automatically also turn on x&#039;80&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For non Optimized Field Extraction Files the field value pair contains two parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4 bytes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Optimized Field Extraction Files the field value pair contains three parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the length of the value for this pair (1 to 4); 2 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 1 byte for all others.&lt;br /&gt;
* the value (variable length, 1-4 bytes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By storing a length with &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; field occurrences, data in records can be read much faster. The possible tradeoff on performance versus space is discussed in [[File Design (File Management) Optimized Field Extraction Files|File Design]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FLOAT fields ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;[[Field Design (File Management)#FLOAT attribute|FLOAT]]&amp;lt;/var&amp;gt; fields are stored differently depending on whether the file has the Optimized Field Extraction ([[FILEORG parameter|FILEORG]] x&#039;80&#039;) bit set.  Note that [[FILEORG parameter|FILEORG]] X&#039;100&#039; files automatically also turn on x&#039;80&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For non Optimized Field Extraction Files the field value pair contains two parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the value which is &#039;&#039;&#039;always&#039;&#039;&#039; held as 4, 8, or 16 bytes, depending on the &amp;lt;var&amp;gt;LENGTH&amp;lt;/var&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Optimized Field Extraction Files the field value pair contains three parts:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the field code from [[Table A (File Architecture)|Table A]]; 2 bytes.&lt;br /&gt;
* the length of the value for this pair (1 to 4); 2 bytes for [[FILEORG parameter|FILEORG]] X&#039;100&#039; files or 1 byte for all others.&lt;br /&gt;
* the value (variable length, 1-4 bytes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;By storing a length with &amp;lt;b&amp;gt;all&amp;lt;/b&amp;gt; field occurrences, data in records can be read much faster. The possible tradeoff on performance versus space is discussed in [[File Design (File Management) Optimized Field Extraction Files|File Design]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Managing_file_groups&amp;diff=59497</id>
		<title>Managing file groups</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Managing_file_groups&amp;diff=59497"/>
		<updated>2013-05-14T23:21:47Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Partitioning for performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&amp;lt;p&amp;gt;File groups are sets of files which process as if they were one.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are three types:&amp;lt;/p&amp;gt;&lt;br /&gt;
* Permanent groups&lt;br /&gt;
* Temporary groups, and&lt;br /&gt;
* Ad-hoc groups &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Permanent, Temporary and Ad-hoc Groups ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CREATE GROUP command and the types of groups ===&lt;br /&gt;
&amp;lt;p&amp;gt;Permanent and Temporary file groups are created using the CREATE GROUP command. Ad-hoc groups exist only for a particular &#039;ín&#039; clause (and any label references which refer to the statement). The following chart explains how they are created: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Type of group&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Created...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Permanent &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By the system manager using the CREATE command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User access is determined by the privileges defined for the file group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following syntax to create a permanent group: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE   PERM  GROUP  groupname&lt;br /&gt;
&lt;br /&gt;
FROM  {filename  [AT location] [(OPTIONAL)  |  (MANDATORY)]}  ,... [PARAMETER  parameter[=value] [PARAMETER  parameter[=value]]...&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For information about creating permanent groups, see [[CREATE command: Permanent group|CREATE PERM GROUP]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Temporary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By an individual user with the CREATE command and can be referenced only by that user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Temporary group names exist only during the current login session and are deleted automatically when you log out, unless you delete them during the session.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following syntax to create a temporary group:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE [TEMP] GROUP groupname FROM filename&lt;br /&gt;
  [,filename ...][PARAMETER parameter_list]&lt;br /&gt;
 .    &lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
END &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters available for temporary file groups are detailed in [[CREATE command: Temporary group|CREATE TEMP GROUP]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ad hoc&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Within a User Language request by prefacing a statement with the clause: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;file1&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;file2&amp;lt;/var&amp;gt; [,&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;file3&amp;lt;/var&amp;gt; ...]   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Ad hoc groups have no name and exist only for the current request. They allow record retrieval from many files at once without defining a group in advance. As in any IN clause, all of the files in an ad hoc group must be opened before the group is mentioned. For more information, see the description of Ad hoc groups in the &amp;lt;var&amp;gt;Rocket Model&amp;amp;nbsp;204 User Language Manual&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using Groups ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are a number of reasons why a file manager might set up file groups:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files with large numbers of record ===&lt;br /&gt;
&amp;lt;p&amp;gt;A single Model 204 file may only contain 16.7 million record slots. As applications grow, this limit may not be enough.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Define a permanent file group can support much larger sets of data: there can be up to 254 files in a file group.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, if you take this approach, you would not randomly place the records anywhere in the group, but rather you would partition the files based on some attribute. For example, you may use the Social Security Number to decide which file in a group to place a particular record in. &#039;&#039;&#039;Hint:&#039;&#039;&#039; because some identifiers have hidden meanings (the high order digits of the Social Security Numbers used to identify the region where the application was made, for example), often the low order digits make a better randomizer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Partitioning for performance ===&lt;br /&gt;
&amp;lt;p&amp;gt;But even files where you do not expect to hit the record limit might benefit from partitioning. If you were, for example, to most commonly read data for a particular year, you would probably find that placing all the records for a year in different files would perform better than putting all of the records in a single file and indexing the year for easy access.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Files, Groups, and Reference Context#IN GROUP MEMBER clause|IN GROUP MEMBER clause]] for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Procedure groups in APSYs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When creating Application Subsystems (APSYs) you may (and are encouraged to) specify that the procedure file is actually a group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You may, in your application design, have large amounts of code identical in multiple APSYs, but you may require different global setting between the APSYs. Because, at compile time, procedure files are searched in the order they appear in the group. you can put different &#039;first&#039; procedure files, each followed by the same code base. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See &amp;quot;Overview of the Subsystem Management facility&amp;quot; in [http://www.rocketsoftware.com/m204/products/index/documentation/v7r4/M204-System-Mgr/view The Model 204 System Managers Guide] for more information on APSYs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Postponing reorganizations with Groups ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: the following technique cannot be used if there are references in your code to Internal Record Numbers (IRNs). IRNs (without also specifying a group member, can not be used against group files)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* File X is almost full&lt;br /&gt;
* Define File Y, which looks like File X (same field names)&lt;br /&gt;
* File Y can be defined to have whatever table sizes it needs&lt;br /&gt;
* Group File X and Y together, with File Y as the specified UPDTFILE&lt;br /&gt;
* Run your application against grouped files X and Y&lt;br /&gt;
&amp;lt;p&amp;gt;Example:&amp;lt;/p&amp;gt;     &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE PERM GROUP X FROM X, Y&lt;br /&gt;
PARAMETER UPDTFILE = Y	  	&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_design&amp;diff=59496</id>
		<title>Field design</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_design&amp;diff=59496"/>
		<updated>2013-05-14T23:16:13Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Counting occurrences of a field */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;The field structures in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are at the heart of providing applications which perform the functions that you require in the most efficient manner possible.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This page discusses exactly how the data structures should be defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Designing records, fieldgroups and fields==&lt;br /&gt;
&amp;lt;p&amp;gt;When setting up a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, you must first decide what fields the records will contain. A record in a personnel file, for instance, might contain a social security number field, a last name field, a spouse&#039;s name field, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Variable record formats===&lt;br /&gt;
&amp;lt;p&amp;gt;The record in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is a very loose concept. Physically, it is simply a collection of fields (data items).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Any field in the [[#Table A (File Architecture) Internal File Dictionary|Table A Dictionary]] may appear in any record in the file. It is quite possible that you create a file with many different logical record types with only a few (or even none) appearing in all of the records.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, each record is not required to have a value for every field; so that record lengths are variable, and it can be argued that the entire concept of a record &#039;format&#039; does not apply to Model 204 files. If an employee&#039;s address is unknown or doesn&#039;t exist in a particular logical record, for example, the address field will be left out of the record altogether. The exception to this is [[#Preallocated fields|Preallocated fields]]. If they are are defined for a file, space is reserved in each record for all such fields, even if they would never exist for that logical record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiply occurring fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Most types of fields can be multiply occurring, that is, have more than one value per record. For example, the CHILD field can appear no times, once, or several times in one record.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Field descriptions and attributes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When you describe a field in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file with the [[DEFINE FIELD command|DEFINE FIELD]] or [[REDEFINE command|REDEFINE FIELD]] commands, you specify a field description that consists of the field name followed by a list of field attributes. These attributes determine how a field may be accessed and how it is stored internally. This section describes the attributes supported for &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Within a record, there is usually no restriction on the number of different fields that can have the same attribute (the exception being the key fields for Sorted and Hash Key files). For example, several fields within the same record can have ORD CHAR indices built for them.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Multiply occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For most field attributes there is almost no restriction on the number of times a particular field can occur within a record. This makes file / record design very flexible. If you have a record which has child details as repeating fields or groups, for example, any number may be supported. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Singly occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are a few attributes which require a field to have no more than one occurrence per record:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
*NUMERIC RANGE&lt;br /&gt;
*Sort key fields&lt;br /&gt;
*Hash key fields   &lt;br /&gt;
&lt;br /&gt;
and others which require a field to have no more than one occurrence per record or fieldgroup (depending on the context in which they are defined):&lt;br /&gt;
  &lt;br /&gt;
*AT-MOST-ONE&lt;br /&gt;
*EXACTLY-ONE&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Field Design (File Management) Indexing Fields&amp;quot;&amp;gt;Indexing Fields&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Model 204 files can become quite large, and so it is almost always preferable to directly access the record or records which have particular characteristics. As part of your design process, you should have identified which field(s) are likely to be used for direct retrieval of sets of records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you have a personnel file, you are likely to have a unique identifier for each employee, and it is also likely that you will often want to process only the record or records with that ID.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Where retrievals are attempted against non indexed fields, a search of Table B must be done, and the danger of request cancellation because [[MBSCAN parameter|MBSCAN]] is exceeded exists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Model 204 supports a few different ways to implement these direct searches, and Rocket Software recommends that the default choice for indexing is the ORDERED attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ORDERED and NON-ORDERED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;Fields used in retrieval specifications should normally be defined as ORDERED (unless one of the other indexing methods, described below) is chosen. NON-ORDERED, the default means that all retrieval requests need to scan the records directly in Table B to find the selected records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For the architectural approach to the implementation of the ordered index, refer to: [[Table D (File Architecture)#Understanding the Ordered Index|understanding the Ordered Index]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Choosing an order type====&lt;br /&gt;
&amp;lt;p&amp;gt;An ORDERED field can have an index with either CHARACTER or NUMERIC ordering. This is called its order type. The field&#039;s order type and updating characteristics are declared with the DEFINE command. You can specify only one order type for a field. ORDERED NUMERIC fields contain numeric values stored as standardized floating-point numbers in one section of the index and nonnumeric values in EBCDIC order in another section. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ORDERED CHARACTER fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ORDERED CHARACTER fields use the standard EBCDIC collating sequence. If a field is ORDERED CHARACTER, all values of the field are stored in the Ordered Index in EBCDIC collating sequence order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ORDERED NUMERIC fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A string field value is considered NUMERIC if it consists of digits, with one optional decimal point, and an optional plus or minus sign at the beginning of the string. The value of the number cannot be greater than 1075 or less than -1075.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If an ORDERED NUMERIC field is also FLOAT, exponential format is allowed. Values for BINARY, FLOAT (8), and FLOAT (16) fields are rounded to 15 significant digits. Values for FLOAT (4) fields are rounded to 6 significant digits. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An invalid value is stored as an unconverted string.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In ORDERED NUMERIC fields, leading zeros are ignored. For example, 001 and 1 are considered equivalent and are maintained in the ORDERED NUMERIC portion of the B-Tree as the same value. For fields that require a meaningful leading zero (such as zip code), use ORDERED CHARACTER.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values of an ORDERED NUMERIC field that do not satisfy the definition of NUMERIC are stored in a separate section of the Ordered Index and processed in EBCDIC order. During FOR EACH VALUE and FOR EACH RECORD IN ORDER BY FIELD processing of an ORDERED NUMERIC field, these values are processed after the valid NUMERIC values unless you restrict the range of values.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Default order types&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is defined as ORDERED without specifying which type of ordering to create, a default order type is used. The default depends on whether the field is STRING, BINARY, or FLOAT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;The default order type is...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BINARY or FLOAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED NUMERIC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
====ORDERED field definition====&lt;br /&gt;
&amp;lt;p&amp;gt;The ORDERED attribute has options that allow you to determine the type of ordering the Ordered Index is to have, as well as some of the characteristics of the Ordered Index tree as it expands or is rebuilt. These options are described in the discussions of order type and Ordered Index tree structure that follow.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining ORDERED field attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFINE command is used to specify a field&#039;s attributes. (See &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;.) The format of the DEFINE command with the ORDERED attribute options is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; WITH &amp;lt;var&amp;gt;ORD&amp;lt;/var&amp;gt;ERED &lt;br /&gt;
   [&amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt;ACTER | &amp;lt;var&amp;gt;NUM&amp;lt;/var&amp;gt;ERIC][&amp;lt;var&amp;gt;SPL&amp;lt;/var&amp;gt;I&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;PCT &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s&amp;lt;/var&amp;gt;] [IMMED &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;i&amp;lt;/var&amp;gt;] &lt;br /&gt;
   [&amp;lt;var&amp;gt;LRES&amp;lt;/var&amp;gt;ERVE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;r&amp;lt;/var&amp;gt;] [&amp;lt;var&amp;gt;NRES&amp;lt;/var&amp;gt;ERVE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;] &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default designation for a field is NON-ORDERED. Ordered Index tree parameters do not apply for a NON-ORDERED field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;CHARACTER&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;NUMERIC&amp;lt;/var&amp;gt; order types are described above.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;SPLITPCT&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;IMMED&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LRESERVE&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;NRESERVE&amp;lt;/var&amp;gt; parameters are described in [[Table D (File Architecture)#Ordered Index spacing parameters|Ordered Index spacing parameters]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing between ORDERED or NUMERIC RANGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ORDERED attribute has several advantages over the NUMERIC RANGE attribute, and as such should be the normal choice. Specifically:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index allows for multiple occurrences of the same numeric field in a record. The NUMERIC RANGE attribute issues an error message whenever an attempt is made to store more than one occurrence of the same NUMERIC RANGE field in the same record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cost of updating an ORDERED field is lower than that of a NUMERIC RANGE field. The NUMERIC RANGE field requires multiple attributes to be maintained to describe the characteristic of a number. The cost of an update to the Ordered Index is always proportional to the depth of the tree.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In most cases, especially with large numbers, the Ordered Index uses less space to maintain the index information.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index allows for more accurate range requests, with numbers representable by IBM double-word floating-point numbers.   &lt;br /&gt;
&amp;lt;p&amp;gt;Although range retrievals are usually faster for ORDERED fields than for NUMERIC RANGE fields, the size of the range interval and the density of the distribution of values over that range are the principal determining factors. NUMERIC RANGE retrievals are faster for very large ranges with densely distributed data values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Choosing between ORDERED or FRV====&lt;br /&gt;
&amp;lt;p&amp;gt;The ORDERED attribute is usually a better alternative to the FRV attribute. Although FRV fields with small numbers of values may perform faster in value loop processing, they lose this advantage if the found values are required to be in order, and as the number of values increase. FRV ordered retrievals require additional sorting. For retrievals in ascending or descending order, ORDERED fields are more efficient. For (presumably rare) right-adjusted character strings in order, ORDERED fields require additional sorting.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility ORDERED with other field attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following guidelines when specifying the ORDERED attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field cannot be both ORDERED and FRV.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field cannot be both ORDERED NUMERIC and NUMERIC RANGE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field can be both KEY and ORDERED (but serves little or no purpose).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field can be both INVISIBLE and ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field can be both DEFERRABLE and ORDERED. If the field is DEFERRABLE, the index updates can be written out to a (see [[#DEFERRABLE and NON-DEFERRABLE attributes|DEFERRABLE and NON-DEFERRABLE attributes]] for details). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE field must be ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hash and sort key fields and record security fields can be ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;and... fields which are defined as KEY may be converted to ORD with no code changes required (as direct retrievals will work with either type of ORD field)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an architectural view of the ordered index, see [[#Table D (File Architecture) Ordered Index|the Ordered Index]]&lt;br /&gt;
&lt;br /&gt;
===KEY and NON-KEY attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The KEY and NON-KEY attributes govern whether to create a hash index for a field or not. If KEY is specified, an index is created for the field. Retrieval commands will access the index for that field. If NON-KEY is specified, every record in the table is examined. The NON-KEY attribute is a default field description. This section provides information about space and performance for each of these attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;KEY attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When storing fields that have the KEY attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes special entries in the hash index. During retrieval, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; goes directly to the appropriate index entry to find which records satisfy the selection criteria, without searching through other records in the file. This makes retrieval based on KEY fields extremely fast. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;However, these index entries must be updated, when User Language statements or Host Language Interface functions add, change, or delete fields. Processing might take slightly longer for KEY fields than for NON-KEY fields. In addition, the space occupied by the index entries can be considerable, especially in large files and in fields that take on many values.           &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NON-KEY attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;No index entries are maintained in Tables C and D for NON-KEY fields. When a retrieval is performed based on the value of NON-KEY fields, the data in Table B must be searched directly. The direct search can have a significantly adverse effect on performance, if a large number of records must be searched. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;However, the cost of the direct search can be greatly reduced in some cases where both KEY and NON-KEY fields are specified in the retrieval conditions. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reduces the number of records to be searched directly by performing the indexed selection first. Records that are definitely eliminated, based on the KEY conditions, are not searched directly. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing between KEY or NON-KEY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the following guidelines in mind when deciding to designate a field as KEY or NON-KEY:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If space is not an overriding consideration, designate fields that are used frequently for retrievals of equality as KEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a field is updated frequently and only occasionally used for retrieval, define it as NON-KEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a field is used frequently for retrievals and updated frequently, the choice is less obvious. If you reserve sufficient space in Tables C and D for adding inversion entries, the field initially can be defined as NON-KEY and changed later with the REDEFINE command (see &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FOR EACH VALUE (FRV) and NON-FRV attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The FRV attribute is useful when creating fields used in value loop processing. If the FRV attribute is not specified when a field is defined, the NON-FRV attribute is assumed. If this attribute is set, the field is usually assigned the KEY attribute as well.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Table space for FRV fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Every value of an FRV field is automatically encoded in Table A, whether or not the value is stored in Table B (that is, INVISIBLE). In addition to more Table A space, FRV fields require slightly more Table C and Table D space than ordinary key fields. Because of these additional space requirements, the FRV attribute is most frequently defined for fields in which the number of different values does not exceed approximately 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the FRV attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FRV attribute behaves in a special way when combined with the BINARY attribute. This is discussed in [[#BINARY attribute|BINARY attribute]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields cannot be defined with the FRV attribute in First-Normal Form (1NF) files. See &amp;lt;b&amp;gt;See 1NF file model&amp;lt;/b&amp;gt; for more information about them. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== FRV attribute, FRV User Language Statement ====&lt;br /&gt;
&amp;lt;b&amp;gt;Value loops&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User Language provides a special construction called a value loop that executes a set of statements once for each different value of an indicated field. The loop is initiated by the FOR EACH VALUE statement; the field must have the FRV or ORDERED attribute. The FOR EACH VALUE statement has Host Language equivalents in IFFDV and IFGETV. A value loop is illustrated in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;EACH.STATE: &lt;br /&gt;
FOR EACH VALUE OF STATE&lt;br /&gt;
    GET.RECS: &lt;br /&gt;
    FIND ALL RECORDS FOR WHICH&lt;br /&gt;
        STATE = VALUE IN EACH.STATE&lt;br /&gt;
    END FIND&lt;br /&gt;
    TOT.RECS: &lt;br /&gt;
    COUNT RECORDS IN GET.RECS&lt;br /&gt;
    PRINT.CT: &lt;br /&gt;
    PRINT VALUE IN EACH.STATE -&lt;br /&gt;
          WITH COUNT IN TOT.RECS AT COLUMN 20&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;On the first pass through the loop, a value of STATE, such as DELAWARE, is selected. The last statement prints DELAWARE and the number of records with the field-name-equals-value pair: STATE = DELAWARE. On the next pass, another value is chosen, such as IOWA, and so on until all values of the STATE field have been processed exactly once.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the IN ORDER option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The IN ORDER option of the FOR EACH VALUE statement specifies that the values of an FRV KEY field be presented in an ordered sequence-ascending, descending, numerical, right adjusted. This option improves performance by avoiding Online sorts of a large number of records, because only the values are sorted instead of a large found set of records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Value loop processing for ORDERED fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can also use value loop processing on fields with the ORDERED attribute. When the FOR EACH VALUE statement with the IN ORDER option is used for NON-FRV, ORDERED fields, ORDERED retrievals can be significantly faster than FRV ordered retrievals. See [[#ORDERED and NON-ORDERED attributes|ORDERED and NON-ORDERED attributes]] for a description of the ORDERED attribute.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Value loop processing can be made more flexible and efficient by using pattern matching, described in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NUMERIC RANGE and NON-RANGE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;Prior to the introduction of ORDered NUMeric fields, Model 204 permitted range retrieval (a field value numerically equal to, less than, greater than, or between certain values) with the NUMERIC RANGE attribute. This attribute indexes the component parts of a numeric value and then joins them, to provide rapid numeric range retrievals without a direct search of the records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE attribute is not specified when a field is defined, the NON-RANGE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, for any new fields being defined,the ORDERED NUMERIC attribute is used in preference to  NUMERIC RANGE.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The NUMERIC RANGE attribute may not be set where the product of [[ASTRPPG parameter|ASTRPPG]] * [[ATRPG parameter|ATRPG]] is greater than 4000 (available in FILEORG parameter|FILEORG x&#039;100&#039; files).&amp;lt;/p&amp;gt; &lt;br /&gt;
====NUMERIC RANGE retrieval specifications====&lt;br /&gt;
&amp;lt;p&amp;gt;The following retrieval specifications, with their symbolic operator equivalents in parentheses, can be used:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;fieldname IS value&lt;br /&gt;
fieldname IS EQ (=) value&lt;br /&gt;
fieldname IS LESS THAN (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS GREATER THAN (GT or &amp;gt;) value&lt;br /&gt;
fieldname IS BETWEEN (GT or &amp;gt;) value AND (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS GREATER THAN (GT or &amp;gt;) value AND LESS THAN (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS LESS THAN (LT or &amp;amp;lt;) value AND GREATER THAN (GT or &amp;gt;) value &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;The following examples show numeric retrieval specifications:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH AMOUNT IS 53.00&lt;br /&gt;
     DATE IS BETWEEN 050500 AND 050532&lt;br /&gt;
END FIND&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These specifications retrieve records for which AMOUNT has a value of 53.00 (or 53 or 053, and so on) and DATE has a value in May 2005.&amp;lt;/p&amp;gt;&lt;br /&gt;
====NUMERIC RANGE retrieval fields====&lt;br /&gt;
&amp;lt;p&amp;gt;The values of NUMERIC RANGE retrieval fields can be either positive or negative numbers that have as many as ten digits on either side of the decimal point (20 digits maximum). When such fields are stored, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes many entries in Tables C and D as well as some special entries in the field name (attribute) section of Table A. These entries are quite complex, and NUMERIC RANGE retrieval fields require both more storage space and more time to store and update than do KEY fields.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In deciding whether to define a field as NUMERIC RANGE or NON-RANGE (and NON-ORDERED), use the same criteria used in [[#Choosing between KEY or NON-KEY|Choosing between KEY or NON-KEY]], keeping in mind the additional overhead caused by the extra index entries for RANGE fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Interpreting nonnumeric values====&lt;br /&gt;
&amp;lt;p&amp;gt;If a NUMERIC RANGE field is stored with a value that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot interpret as a number, the system stores a special index entry for the record. The field name of this special entry consists of the NUMERIC RANGE retrieval field name with ++ appended. The entry has a value of NON NUMERICAL. Thus, the following User Language retrieval retrieves all records with nonnumerical values of AGE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     AGE++ = NON NUMERICAL&lt;br /&gt;
END FIND &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This can be useful in locating bad input data.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify as many NUMERIC RANGE retrieval fields in each record as you need. However, a particular NUMERIC RANGE retrieval field might not be multiply occurring within any one record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot specify the NUMERIC RANGE attribute in the following circumstances:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;With any field defined as FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For any field in a 1NF file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a chart showing valid and invalid attribute combinations, see [[ Field Attribute Combinations#Combining attributes|Combining attributes]]. If you are defining field attributes with FILEMGMT, you will not be allowed to specify incompatible attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Typing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The following attributes are described individually in the next sections. They represent the way the field is physically stored. Only one of these may be assigned to any field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STRING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BINARY&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BLOB, CLOB, MINLOBE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DATETIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTF-8 or UTF-16&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;VISIBLE, INVISIBLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===STRING attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;STRING is the default attribute for all fields. If your data is character or alphanumeric, such as names and addresses, specify a data type of STRING. STRING fields are also useful if you plan to store mixed data types in an image. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The length of a STRING field is limited to 255 bytes, because the first byte of a STRING data field is a count byte-that is, a byte that contains the length of the rest of the string. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BINARY attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;Fields whose values are decimal integers can alternatively be compressed and stored as 4-byte binary numbers with the BINARY attribute. Specifying BINARY saves Table B space if the average value of the field is from 4-9 digits long.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Acceptable BINARY values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To be compressed successfully, the value must be1-9 digits long and can contain a minus sign. It cannot contain a plus sign, a decimal point, or leading zeros. If the value cannot be compressed, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; refers to the CODED/NON-CODED field attribute (which the BINARY attribute usually overrides) to decide how to store the value.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BINARY and FRV fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BINARY attribute overrides the FRV attribute, except for values that cannot be compressed. If the field cannot be compressed, it will be stored in Table A in either the FEW-VALUED or MANY-VALUED pages depending on the field definition. For instance, AGE has been defined with the BINARY and FRV attributes and takes on the values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23, 04, -34578, 935., 20,&lt;br /&gt;
+8754, and TWO &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement FOR EACH VALUE OF AGE retrieves only the values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;04, 935., +8754 and TWO &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If BINARY is not specified when a field is defined, the STRING attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BINARY fields and NUMERIC VALIDATION files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a BINARY field is defined in a NUMERIC VALIDATION file model file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides numeric data type validation. If you try to store nonnumeric or other nonconforming (that is, noncompressible) data in a BINARY field in a NUMERIC VALIDATION file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cancels the request with the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2123: VALUE SPECIFIED VIOLATES BINARY DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;BLOB attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;CLOB attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;MINLOBE attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===BLOB, CLOB and MINLOBE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The BLOB and CLOB attributes describe Large Object data that may be used to store long strings in the database, for example, long XML strings. This means that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language threads can exchange Large Object data with a partner process via the Universal Buffer and/or the MQ/204 Interface. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Via the Universal Buffer, Large Object data can be sent and received using User Language READ IMAGE and WRITE IMAGE statements.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Via the MQ/204 Interface, Large Object data can be sent and received by MQPUT and MQGET statements, stored and retrieved from the database with User Language STORE, ADD, and assignment statements using the BUFFER reserved area name.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Files created in V6R1.0 and later are not compatible with earlier versions of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;, because of Large Object support and the concomitant changes to the FPL page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Introducing Large Object field types&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Large Object field types includes the following Character Large Object (CLOB) and Binary Large Object (BLOB) attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CLOBs are character strings. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BLOBs are binary strings. No translation is performed when the object is sent or received.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Limitations of Large Object support&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Currently there is a limit of 2,147,483,647 bytes (or two gigabytes) of data per Large Object.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For CLOBs the translation of ASCII to EBCDIC and back is handled by the design of your application.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For BLOBs no translation is performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The User Language INSERT statement is not supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Handling Large Object data&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BLOB and CLOB attributes are supported as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can create, open, and recover a file with a BLOB or CLOB attribute. The Large Object field can be multiply occurring. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DELETE fieldname statement supports the Large Object data. This statement frees the Table B and Table E data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;You can store and add a Large Object data to the file you have created from the Universal Buffer, BUFFER. Using an assignment statement you can transfer Large Object data from a field into the Universal Buffer.&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can set the number of Table E pages during file creation with PARAMETER ESIZE= n.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can view the EHIGHPG parameter to determine the highest number of Table E pages in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can modify the size of Table E with an INCREASE or DECREASE command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DELETE FIELD fieldname command supports the Large Object field type, so you can delete a Large Object field name. However, the space in Table B and Table E is not automatically available for reuse. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;$LOBLEN(lob-field-name) function is available for your use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Dictionary/204 and the Cross-Reference facility support Large Object field types.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;NULL Large Object data is supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Transaction back out is supported for Large Object field types.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field-level security is supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BLOB and CLOB compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Combining BLOB or CLOB with other field attributes, except OCCURS, MINLOBE, or UTF-8, is meaningless. Use of any other attributes produces the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0411: CONFLICTING ATTRIBUTES: ([BLOB | CLOB]) attribute2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the MINLOBE (MLBE) attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can use the MINLOBE attribute only with a BINARY LARGE OBJECT (BLOB) or a CHARACTER LARGE OBJECT (CLOB) field in a file with FILEORG X&#039;100&#039;. The MINLOBE attribute cannot be paired with the OCCURS attribute. You can redefine the MINLOBE attribute value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MINLOBE nnn&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default and smallest value for MINLOBE is 0, which means that all values of the field are stored in TABLEE. The maximum value of MINLOBE is 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field has the MINLOBE attribute greater than 0:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;And the value of the field is not longer than MINLOBE, then the value is stored in Table B or Table X, instead of Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The User Language CHANGE statement is not allowed and the following error is displayed:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2869 CHANGE NOT ALLOWED: MINLOBE &amp;gt; 0 FOR FIELD fieldname&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Any CHARACTER LARGE OBJECT or BINARY LARGE OBJECT field which does not use the CHANGE statement benefits from setting MINLOBE 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESERVE clause is ignored on the User Language ADD statement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing and updating LOBs&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All large object data (LOBs) in a FILEORG=X&#039;100&#039; file are chained. There are four bytes per Table E page overhead for chained LOBs. The pages used by a chained LOB are not contiguous.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Handling LOBs in FILEORG=X&#039;100&#039; files also has the following effects:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESERVE clause is ignored in a LOB field ADD statement processing, as well as the STORE RECORD statement processing of fieldname=value pairs.&lt;br /&gt;
&amp;lt;p&amp;gt;Consequently, the CHANGE statement does not fail because of   insufficient reserved space. If the CHANGE statement requires that a LOB field be extended, it is.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The value of the EHIGHPG parameter is always one less than the high water mark of the number of pages used to hold LOBs. (Unless none were ever added, in which case it is zero, not -1).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The value of the EPGSUSED parameter is always the number of pages currently being used to hold LOBs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The COMPACTE command does not process FILEORG=X&#039;100&#039; files, just as it does not process a file created in V6R1 or earlier. Thus, issuing a COMPACTE command for a FILEORG X&#039;100&#039; file produces an error message.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The TABLEE command effectively does a VIEW ESIZE EHIGHPG EPGSUSED for a FILEORG X&#039;100&#039; file. Consequently there are no TABLEE overhead pages in a FILEORG=x&#039;100&#039; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FLOAT attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;Any field whose values are always, or almost always, numeric might be more efficiently stored in a floating-point representation than in character form. Using FLOAT can also reduce the time spent in data type conversions for fields used frequently in User Language or Host Language Interface computations.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Very large or very small numbers, or numbers with many significant digits, occupy considerably less space in floating-point form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Floating-point fields are fully supported by User Language, the Host Language Interface, and the File Load utility. For more information about storing values in floating-point fields, such as conversion, rounding, and precision rules, see the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FLOAT is not specified when a field is defined, the STRING attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining floating point fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field values are stored in floating-point by specifying the FLOAT attribute in the DEFINE FIELD command and supplying a LENGTH of 4, 8, or 16. The length supplied determines the precision of the floating-point field being defined. For example, to define a long precision field, specify:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; WITH FLOAT LEN 8 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can define three types of floating point fields through the FLOAT and LENGTH attributes.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Type of floating-point field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Occupies...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Holds a maximum of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; maintains a maximum precision of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Short precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4 bytes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; 6 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Long precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8 bytes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Extended precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;16 bytes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;31 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Acceptable values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The floating-point data type uses IBM hardware&#039;s floating-point representation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A value of negative zero (X&#039;800...0&#039;) cannot be stored in a preallocated FLOAT field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FLOAT with NUMERIC VALIDATION files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you define a FLOAT field in a NUMERIC VALIDATION file model file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides numeric data type validation. Trying to store non-conforming data in a FLOAT field in a NUMERIC VALIDATION file causes &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to cancel the request with the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2124: VALUE SPECIFIED VIOLATES FLOAT DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;STRING, BINARY, NUMERIC RANGE, and INVISIBLE cannot be specified for a FLOAT field. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing invalid numeric data: FLOAT or ORDERED NUMERIC===&lt;br /&gt;
&amp;lt;p&amp;gt;Prior to Version 5.1, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; did not enforce storage rules for floating point numbers outside the valid range and could incorrectly store invalid floating point data as small, but nonzero floating point numbers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The valid range of floating point numbers is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1E-74 through 7.2370E+75&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;7.2371E75 is outside the valid range for floating point numbers. Prior to Version 5.1, it was stored as a true floating point number of the order of E-78 following the error message:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0563: ARITHMETIC OVERFLOW&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;1E-75 is also out of the valid range; it was stored as a true floating point number 1E-75.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As of Version 5.1:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Storing the value 7.2371E75 in a FLOAT field does not result in error &amp;lt;var&amp;gt;M204.0563: ARITHMETIC OVERFLOW.&amp;lt;/var&amp;gt; The value is treated as an invalid floating point number; it is stored as a data string &#039;7.2371E75&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;1E-75 is treated as an invalid floating point number and stored as a data string &#039;1E-75&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If an invalid value is stored for a field with the ORDERED NUMERIC attributes, the value stored in the Ordered Index is the data string. That data string is stored on the Invalid Numeric Data portion of the Ordered Index. This changes the output order of these values when the ordering is done against the Ordered Index, for example, when using the User Language IN ORDER BY or FOR EACH VALUE clauses.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Identifying pre-Version 5.1 floating point values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The changed storage of invalid floating point values affects only new values you store in Version 5.1. Values already stored in the file are not corrected. You must find and correct these values, if necessary. The following procedure may help you, if the field is also defined as ORDERED NUMERIC or FRV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Floating point ordered numeric values outside the valid range may be explicitly identified, removed, and replaced with valid values. This process can be done either before or after migrating to Version 5.1. Migrating itself, without rebuilding files, does not remove the bad values; nor does issuing a REORGANIZE ORDERED INDEX command against the file, regardless of the release version of the REORGANIZE command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It is safer to rebuild under Version 5.1, because invalid values are inserted into the Invalid Numeric section of the Ordered Index. If you rebuild under a prior version, the only safeguard against improper reinsertion of invalid values is their explicit identification and removal prior to the rebuild process. You can confirm the presence of invalid values by running a procedure such as the following. Note the following fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;problem_field&lt;br /&gt;
&amp;lt;p&amp;gt;For each occurrence of problem_field substitute a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; field name, which you suspect stores invalid floating point values. problem_field must be an ORDERED NUMERIC or FRV field, which is already defined to the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEMP_FIELD&lt;br /&gt;
&amp;lt;p&amp;gt;A &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; field name of an ORDERED CHARACTER field defined for use in only the following procedure.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE TEMP_FIELD (ORD CHAR)&lt;br /&gt;
BEGIN&lt;br /&gt;
STORE RECORD&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;* MAKE SURE THAT THERE IS A TRUE FLOATING PT 0&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;* FOR THE SUSPECTED FIELD&lt;br /&gt;
problem_field = 0&lt;br /&gt;
TEMP_FIELD = X&lt;br /&gt;
END STORE&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
BEGIN&lt;br /&gt;
FDV: FIND ALL VALUES OF problem_field&lt;br /&gt;
FR: FOR EACH VALUE IN FDV&lt;br /&gt;
%X = VALUE IN FR&lt;br /&gt;
  IF %X = 0 THEN&lt;br /&gt;
     %COUNT_OF_ZEROS = %COUNT_OF_ZEROS + 1&lt;br /&gt;
  END IF&lt;br /&gt;
END FOR&lt;br /&gt;
  IF %COUNT_OF_ZEROS GT 1      THEN&lt;br /&gt;
    PRINT &#039; FIELD CONTAINS VALUES OUT OF RANGE&#039;&lt;br /&gt;
  END IF&lt;br /&gt;
END&lt;br /&gt;
BEGIN&lt;br /&gt;
FD: FD&lt;br /&gt;
 TEMP_FIELD = X&lt;br /&gt;
END FIND&lt;br /&gt;
FR IN FD&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;* REMOVE THE DUMMY RECORD YOU ADDED TO THE FILE&lt;br /&gt;
 DELETE RECORD&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
DELETE FIELD TEMP_FIELD&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The previous procedure can find floating point values out of range only if the field is FRV or ORDERED. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support recommends that you add the ORDERED attribute to use the previous procedure.&amp;lt;/p&amp;gt;&lt;br /&gt;
===DATETIME (DT) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The DATETIME attributes specifies the format of the stored data in Table B, not its function. The other date/time attributes are automatically updated fields generated at the time of record or field group creation or update. A non-automatic field can have a DATETIME format, but all the automatic date/time fields are stored in DATETIME format. The DATETIME attribute requires at least eight significant digits. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define a DATETIME value for a field, you cannot redefine the DATETIME value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UTF-8 and UTF-16 attributes===&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;General availability of the UTF-8 and UTF-16 attributes is in Model 204 release 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UTF-8 attribute indicates that data is stored in [http://en.wikipedia.org/wiki/UTF-8 UTF-8] format and is treated as [[Unicode|unicode]] data inside SOUL programs. A UTF-8 field can be defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD UTFDATA WITH [UTF-8 | UTF8]&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD UTFBLOB WITH BLOB [UTF-8 | UTF8]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UTF-16 attribute indicates that data is stored in [http://en.wikipedia.org/wiki/UTF-16 UTF-16] format and is treated as [[Unicode|unicode]] data inside SOUL programs. A UTF-16 field can be defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD UTFDATA WITH [UTF-16 | UTF16]&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD UTFBLOB WITH BLOB [UTF-16 | UTF16]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Usage notes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Since UTF-8 or UTF-16 fields behave like unicode variables in SOUL requests printing fields with unicode characters that cannot be converted to displayable EBCDIC results in those characters being [http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_reference_overview character-entity encoded], just as they are encoded when printing unicode variables. This is also true when printing is done via a [[Basic User Language Statements and Commands#PRINT_ALL_INFORMATION_.28or_PAI.29_statement|PAI]] statement. For example, a UTF-8 field containing the unicode value of &amp;quot;I like apple &amp;amp;pi;&amp;quot; would be printed as &amp;quot;I like apple &amp;amp;amp;#x03C0;&amp;quot;. The &amp;amp;amp; symbol is always encoded as &amp;amp;amp;amp; when printed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Just as with unicode variables, assigning an EBCDIC value to a unicode field results in the EBCDIC value being converted to unicode and then to UTF-8 or UTF-16 for storage. Simlarly, assigning a UTF-8 or UTF16 field to an EBCDIC variable results in the UTF-8 or UTF-16 value being converted to unicode and then translated to EBCDIC. In either EBCDIC to unicode or unicode to EBCDIC translation, errors result in request cancellation.&lt;br /&gt;
&amp;lt;li&amp;gt;Unless the preponderance of data stored in UTF-8 or UTF-16 fields has unicode values greater than U+07FF (most likely if most of the data contains Asian language characters), UTF-8 is a better choice for storing unicode data, since UTF-16 requires two bytes for every unicode character while UTF-8 only requires one byte for many common characters and only two bytes for unicode characters up to U+07FF.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTF-8 and UTF-16 fields can be LOB fields or they can be STRING fields (stored in table B).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a UTF-8 or UTF-16 field is defined as an OCCURS field, the length indicates the length in bytes, not the length in characters. Since UTF-8 encoding can use anywhere from one to three bytes to represent a single unicode character in the [http://en.wikipedia.org/wiki/Unicode_plane#Basic_Multilingual_Plane BMP], the only unicode characters supported by SOUL, it can be tricky using UTF-8 fields as OCCURS fields since setting the defined length requires an educated guess about the types of unicode characters that will be store in the field or (probably) oversizing a UTF-8 field to three bytes per character. In the latter case, it would make much more sense to define such a field as UTF-16 as that requires exactly two bytes for each character.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===VISIBLE and INVISIBLE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;In general, you want to be able to retrieve, and then display or print fields, or use the field values in a report. These are fields that you want defined as VISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, however, you have a field that is used only to retrieve records, and space is a consideration, you may want to define the field as INVISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the INVISIBLE attribute is not specified when the field is defined, the VISIBLE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the VISIBLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once an application retrieves a record with a User Language FIND statement or a Host Language IFFIND call, it generally processes one or more fields in User Language PRINT, NOTE, or SORT statements, arithmetic expressions, or Host Language IFGET calls. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CHECK.SALARY: &lt;br /&gt;
IF SALARY GT 1000*AGE&lt;br /&gt;
   THEN PRINT NAME&lt;br /&gt;
END IF &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field referred to by the PRINT statement must have the VISIBLE attribute in its field description. This means that the field-name-equals-value pair is actually stored in the logical record in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the INVISIBLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field that has the INVISIBLE attribute, on the other hand, takes up no storage space in Table B and cannot be printed, noted, or sorted. These fields can be added, deleted, or changed in the logical record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Choosing the INVISIBLE attribute:&amp;lt;/b&amp;gt; In a library catalog file, for example, each record can have an AUTHOR field that contains the author&#039;s full name. In addition, there can be a LAST NAME field that contains only the author&#039;s last name. This creates a convenient index to the catalog and relieves the user of the burden of knowing the entire name when making retrieval requests. Because the author&#039;s last name already is part of the (VISIBLE) AUTHOR field, some space can be saved in Table B by selecting the INVISIBLE attribute for LAST NAME.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because INVISIBLE fields are not stored in Table B, they require special care if the file is ever reorganized. When designing a file, be sure to take reorganization requirements for these fields into consideration. See &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt; for a description of techniques that can be used to recreate INVISIBLE fields.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Maintaining INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;INVISIBLE fields must also have the KEY, NUMERIC RANGE, or ORDERED attribute, and they are normally used only to retrieve records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The User Language FILE RECORDS statement and the Host Language Interface IFFILE function can be used to rapidly add an INVISIBLE KEY field name = value pair to an entire set of records. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL.RECS: FIND ALL RECORDS FOR WHICH&lt;br /&gt;
            NAME = SMITH OR SMYTHE OR SMYTH&lt;br /&gt;
          END FIND&lt;br /&gt;
FILE: FILE RECORDS IN ALL.RECS UNDER HOMONYM = SMYTH &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes entries in Tables C and D to allow retrievals with the specification HOMONYM = SMYTH but does not change Table B. For further information about adding, changing, or deleting INVISIBLE fields, see the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table B considerations&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The values of VISIBLE fields can be stored in the logical record in Table B in one of four formats depending upon the selection of STRING/BINARY, CODED/NON-CODED, or FLOAT field attributes. The choice affects space requirements and, except for a slight increase in the time required for updates and some types of retrievals (see [[#CODED and NON-CODED attributes|CODED and NON-CODED attributes]]), is transparent to the user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The values of fields that have the INVISIBLE attribute are not stored in Table B, and physical storage attributes cannot be specified in their descriptions. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using INVISIBLE fields in 1NF files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The First-Normal form relational model cannot be enforced for INVISIBLE fields. However, INVISIBLE fields are useful within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; for list processing and to support SQL multicolumn keys (see the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SQL Server User&#039;s Guide for more information). Therefore, the INVISIBLE field attribute is allowed, but INVISIBLE fields are not mapped to SQL-accessible columns. The following rules and restrictions apply to INVISIBLE fields in 1NF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because the INVISIBLE and AT-MOST-ONE attribute are incompatible, INVISIBLE fields must be defined as REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot REDEFINE a field as INVISIBLE within a 1NF file; the INVISIBLE and REPEATABLE attributes can be specified only with a DEFINE command. In the case of a record security key field, use the INITIALIZE command to specify the field as INVISIBLE and REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE fields in 1NF files must also be ORDERED or KEY (NUMERIC RANGE is not legal in a 1NF file and results in an error message). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The INVISIBLE attribute cannot be specified for a field defined with the FLOAT or AT-MOST-ONE attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data Content ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to the data type (above), there are additional attributes which further control how the data is stored and manipulated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CODED, NON-CODED &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;OCCURS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LENGTH&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PAD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FEW-VALUED, MANY-VALUED &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE IN PLACE, UPDATE AT END&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DEFAULT-VALUE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STORE-DEFAULT, STORE-NULL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AT-MOST-ONE, REPEATABLE and EXACTLY-ONE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DEFERRABLE/NON-DEFERRABLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===CODED and NON-CODED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The CODED and NON-CODED attributes let you choose between saving disk space (with CODED) or speeding up update and retrieval time (with NON-CODED). This section discusses how these attributes work.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the CODED attribute is not specified when a field is defined, the NON-CODED attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NON-CODED attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is designated NON-CODED without an OCCURS clause (see the following discussion), its value is stored in Table B as a simple character string that has an additional byte to indicate its length. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;NON-CODED is the best choice for any field whose values have an average length of 1-3 bytes whether or not they are compressible numbers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;CODED attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Choose the CODED option to save Table B space where the values of the field are not suitable for BINARY compression and where their average length is four or more characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When a value that has the CODED attribute is defined, the character string is stored in Table A-the internal file dictionary-and a 4-byte value code pointing to that character string is stored in the logical record in Table B. Space is saved when there are several records that contain the same value. The string is stored only once in Table A, and only the 4-byte code is stored in each of the several records in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing CODED vs. NON-CODED&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The coding and decoding of these value codes takes time, which can slow down updates and retrievals. If speed is important and if disk space is relatively plentiful, do not choose the CODED attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If disk space is somewhat tight, choose the CODED attribute for fields where the values are long and where there are a small number of values relative to the number of records in the file. A STATE field is a prime example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A more precise rule governing the choice of the CODED attribute is difficult to arrive at since first it must be determined (based on the number and length of the field values, and on the number of records) if any disk space is actually saved by the CODED attribute. Then, any space saved must be weighed against the extra time taken by CODED retrievals. And the relative importance of disk space and time are likely to vary with the application as well as with the installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The formulas in &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt; show more explicitly the effects of the CODED field attribute on Table A and B size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the $CODE and $DECODE functions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field value encoding is entirely transparent to the user. Data is returned exactly as it was entered. Codes are system-generated, internal codes that have no meaning to a user. If access to both user codes and their translations is needed, use the User Language $CODE and $DECODE functions in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Any VISIBLE field can be a preallocated field. However, a VISIBLE field that appears a fixed number of times in most of the records in a file is most suited for preallocation in Table B. Preallocated fields, if selected appropriately, require less Table B space than other fields and can be updated and retrieved slightly faster.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocation means that space is reserved in each new record added to a file. As occurrences of preallocated fields are stored in a record, they are placed in the reserved space. Space is used even for occurrences that have not been stored, whereas non-preallocated fields use no space for missing occurrences. Preallocation also imposes restrictions on the number and length of values that can be stored in a record. A field is preallocated if its description includes an OCCURS clause. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt; provides specific rules for the amount of space used by preallocated and non-preallocated fields. Use these rules to determine whether or not to preallocate a particular field.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using an OCCURS clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field is preallocated if its description includes an OCCURS clause. The OCCURS clause indicates the number of occurrences of the field that are preallocated or reserved in each Table B record. From 1 to 255 occurrences can be specified. Any number of values, up to the specified limit, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;, can be stored in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Only as many occurrences as have been stored can be retrieved. Space allocated for unstored values is wasted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If OCCURS is not included in a field description, the field still can occur more than once in a record. Space for the occurrences is not preallocated. There is no limit to the number of values that can be stored for a non-preallocated field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Restrictions for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OCCURS option can be specified only for fields that can be preallocated with a fixed length in Table B. This includes only fields that are defined as CODED, BINARY, or LENGTH &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; (see [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]). If a field is defined as BINARY but does not contain an OCCURS clause, values that cannot be compressed to a binary representation still can be stored in the field. If a field is defined as both BINARY and OCCURS, only compressible values can be stored in it. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not allow incompressible values to be stored in such fields. To avoid such compression problems, include CODED with BINARY and OCCURS in the field description. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Displaying the set of preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DISPLAY RECORD command]] will show all of the preallocated fields in a file. This information is stored on a page in [[Table D (File Architecture)|Table D]] where it is used to create the preallocated field space at the beginning of a record when it is initially stored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot distinguish values padded with X&#039;00&#039; from zero-length values explicitly stored in the file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not allow zero-length values to be explicitly stored in preallocated fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
===LENGTH and PAD clauses===&lt;br /&gt;
&amp;lt;b&amp;gt;Using the LENGTH clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the LENGTH clause to specify the length of FLOAT fields, as well as NON-CODED preallocated (OCCURS) string fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;the LENGTH must be specified for NON-CODED preallocated string fields:&amp;lt;/b&amp;gt; the LENGTH must be included in the description of a NON-CODED preallocated string field to set the maximum length of the field. The length must be in the range 1 through 255. The specified length is preallocated for the number of occurrence specified by the OCCURS clause. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;LENGTH with FLOAT fields:&amp;lt;/b&amp;gt; LENGTH is required with FLOAT to indicate the precision of the floating-point field being defined. The LENGTH options in this instance are 4, 8, or 16. (See [[#FLOAT attribute|FLOAT attribute]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Specifying the LENGTH clause:&amp;lt;/b&amp;gt; The LENGTH clause limits the length of values that can be stored in the field. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not store values that are longer than the specified length. The LENGTH clause does not impose any minimum length. Values that are shorter than the specified length are padded with the PAD character to the maximum length as they are stored in Table B and are returned to their original length as they are retrieved. See the description of padding in [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field occurrences that have been preallocated but not stored contain zero-length values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the PAD clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can include a PAD clause in a field description to select the character that is used to pad field values that are shorter than the length specified in the LENGTH clause (see [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]) for the field. If no PAD character is specified in a field description, the default character, X&#039;00&#039;, is used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Padding characters are invisible to the user and are not included in a retrieved value. Make sure that the padding character does not appear as part of a field value. If it does, incorrect results can occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
===FEW-VALUED and MANY-VALUED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;If a field that has the CODED or FRV attribute is expected to take on fewer than about 50 different values, choose the FEW-VALUED attribute. Otherwise, define the field as MANY-VALUED. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This option determines whether the value string is stored in the FEW-VALUED or MANY-VALUED section of Table A, and is invalid for fields that are neither CODED nor FRV. Keep the number of values stored in the FEW-VALUED section small to ensure that this section is kept in core during retrieval and update operations. This practice reduces the number of disk accesses and increases retrieval speed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the FEW-VALUED attribute is not specified when a field is defined, the MANY-VALUED attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
===UPDATE IN PLACE and UPDATE AT END attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides the following field attributes that control the way that the value of a field occurrence is changed in Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
If this attribute is specified...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Then a change in the value of a field &lt;br /&gt;
occurrence...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE IN PLACE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Does not change its position relative to other occurrences of the same field in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This attribute is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE AT END&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Is accomplished by deleting the existing occurrence and adding a new one following the others.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing an update option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify either of these options as part of a field description. The UPDATE AT END approach can be useful in certain data aging applications: for example, in applications in which the first occurrence of a field represents the oldest update to the file, and the last occurrence is the most recent update. UPDATE IN PLACE generally is more efficient.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of update option determines the position of a field occurrence within a record only in relation to other occurrences of the same field. The ordering of different fields within a record is determined by a variety of factors, of which the update method is only one. The order of fields within a record normally is not under the control of the file manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User Language update statements other than CHANGE are not affected by the choice of an update option. The ADD and STORE statements always cause values to be added as the last occurrences in a record. The DELETE statement always removes the deleted value while maintaining the relative ordering of the remaining occurrences.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The values of fields that have the INVISIBLE attribute are not stored in Table B, and UPDATE IN PLACE or UPDATE AT END cannot be specified in their descriptions. &amp;lt;/p&amp;gt;&lt;br /&gt;
===DEFAULT-VALUE (DV) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;A field defined with a DEFAULT-VALUE (DV) attribute value must also be defined with the EXACTLY-ONE or the AT-MOST-ONE attribute. It specifies the value of the field if the value is not explicitly added in the STORE RECORD, ADD FIELDGROUP, or INSERT FIELDGROUP initial data block. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of the STORE-DEFAULT setting determines whether the DEFAULT-VALUE is physically stored on the record or if it is just used as the default value when the field is missing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFAULT-VALUE attribute allows values up to 31 bytes. An attempt to use more results in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2851: DEFAULT-VALUE VALUE&lt;br /&gt;
&#039;1234567890123456789012345678901234567890&#039; TOO BIG, -&lt;br /&gt;
MUST BE &amp;amp;lt;32 BYTES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of DEFAULT-VALUE is not constrained by attributes such as LEQ, LLE, and LGE. &lt;br /&gt;
&lt;br /&gt;
For example, the entire default value is returned for a field that has been added, even if it exceeds the LEQ setting.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STORE-DEFAULT (SD) and STORE-NULL (SN) attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;You can redefine the STORE-DEFAULT and/or STORE-NULL attribute values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The STORE-DEFAULT and STORE-NULL attributes offer these options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LITERAL (the default)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;NONE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ALL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Consider the following example that shows how a DEFAULT-VALUE is handled when the field is defined with the different STORE-DEFAULT types of ALL, NONE, and LITERAL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Here we are defining field NAME_SD_NONE with the STORE-DEFAULT option of NONE, field NAME_SD_LIT with the STORE-DEFAULT option of LITERAL and field NAME_SD_ALL with the STORE-DEFAULT option of ALL. The DEFAULT-VALUE for all of the fields is &#039;NONAME&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In this example, the fields belong to a field group but the STORE-DEFAULT (and STORE-NULL) attribute can also be assigned to a field that is not part of a field group. The only requirement is that the field may not be defined as REPEATABLE, i.e., it must be either AT-MOST-ONE or EXACTLY-ONE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP X&lt;br /&gt;
  DEFINE FIELD NAME_SD_NONE   WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT NONE DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD NAME_SD_LIT    WITH FIELDGROUP X AND -&lt;br /&gt;
                            ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT LITERAL DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD NAME_SD_ALL    WITH FIELDGROUP X AND -&lt;br /&gt;
                            ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT ALL     DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are basically two ways to store a field in a record. It can be stored: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;- using a literal:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STORE RECORD&lt;br /&gt;
   FIELD.A = &#039;ABC&#039;&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;- or by using a variable:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = &#039;ABC&#039;&lt;br /&gt;
STORE RECORD&lt;br /&gt;
   FIELD.A = %X&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additionally, a field may simply be missing (in the following example, the record has a FIELD.B but FIELD.A is missing):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STORE RECORD&lt;br /&gt;
   FIELD.B = &#039;XXX&#039;&lt;br /&gt;
END STORE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The STORE-DEFAULT options determines how the field will be physically stored if the DEFAULT-VALUE is stored in the field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This example shows what is physically stored in the record when the DEFAULT-VALUE is stored for each of these fields. The DEFAULT-VALUE in this case is &#039;NONAME&#039;. First, we will add the actual DEFAULT-VALUE of &#039;NONAME&#039; by using a variable, then by using the literal &#039;NONAME&#039; and finally we will add a field group occurrence where the field is missing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD.X: SUBROUTINE&lt;br /&gt;
   IN FILEX  FRN %CURREC&lt;br /&gt;
      * add first field group occurrence using the -variable %NAME:&lt;br /&gt;
      %NAME=&#039;NONAME&#039;&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SD_NONE = %NAME&lt;br /&gt;
          NAME_SD_LIT  = %NAME&lt;br /&gt;
          NAME_SD_ALL  = %NAME&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add second field group occurrence using the - literal &#039;NONAME&#039;:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SD_NONE = &#039;NONAME&#039;&lt;br /&gt;
          NAME_SD_LIT  = &#039;NONAME&#039;&lt;br /&gt;
          NAME_SD_ALL  = &#039;NONAME&#039;&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add third occurrence of the field group with all -&lt;br /&gt;
 values missing:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          * none of these fields added to this occurrence&lt;br /&gt;
      END ADD&lt;br /&gt;
   END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Subsequent PAI of the field group shows what is physically stored on the record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;The field defined with... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;is...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT NONE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Never stored on the record. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT ALL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Always stored on the record. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT LITERAL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Not stored in the first occurrence, because a %variable was used. It was stored in the second occurrence, because the field was added using a literal string.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;\X = 1&lt;br /&gt;
 NAME_SD_ALL = NONAME&lt;br /&gt;
/X = 1&lt;br /&gt;
\X = 2&lt;br /&gt;
 NAME_SD_LIT = NONAME&lt;br /&gt;
 NAME_SD_ALL = NONAME&lt;br /&gt;
/X = 2&lt;br /&gt;
\X = 3&lt;br /&gt;
/X = 3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note that when the record above is printed the DEFAULT-VALUE is printed regardless of whether the field is physically stored on the record or not. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FR&lt;br /&gt;
   PRINT &#039;# NAME_SD_NONE:  NAME_SD_LIT:  NAME_SD_ALL:&#039;&lt;br /&gt;
FEO:&lt;br /&gt;
   FEO FIELDGROUP X&lt;br /&gt;
      PRINT OCCURRENCE IN FEO AND NAME_SD_NONE AND -&lt;br /&gt;
 NAME_SD_LIT AT 16 AND NAME_SD_ALL AT 30&lt;br /&gt;
   END FOR&lt;br /&gt;
END FOR&lt;br /&gt;
&lt;br /&gt;
NAME_SD_NONE:  NAME_SD_LIT:  NAME_SD_ALL:&lt;br /&gt;
NONAME         NONAME        NONAME&lt;br /&gt;
NONAME         NONAME        NONAME&lt;br /&gt;
NONAME         NONAME        NONAME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note: The same behavior occurs whether the field is AT-MOST-ONE or EXACTLY-ONE. However, a PAI of an EXACTLY-ONE field always shows a value. The actual physical storage on the record is the same.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The options on the STORE-NULL attribute react similarly. When the fields are defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP X&lt;br /&gt;
  DEFINE FIELD NAME_SN_NONE   WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL NONE&lt;br /&gt;
  DEFINE FIELD NAME_SN_LIT    WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL LITERAL&lt;br /&gt;
  DEFINE FIELD NAME_SN_ALL    WITH FIELDGROUP X AND -&lt;br /&gt;
                              ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL ALL  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And code used to store the field groups is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;   IN FILEX  FRN %CURREC&lt;br /&gt;
      * add first occurrence using the variable %NAME:&lt;br /&gt;
      %NAME=&#039;&#039;&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SN_NONE = %NAME&lt;br /&gt;
          NAME_SN_LIT  = %NAME&lt;br /&gt;
          NAME_SN_ALL  = %NAME&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add second occurrence using the literal &#039;&#039;:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SN_NONE = &#039;&#039;&lt;br /&gt;
          NAME_SN_LIT  = &#039;&#039;&lt;br /&gt;
          NAME_SN_ALL  = &#039;&#039;&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add third occurrence with missing values:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
      END ADD&lt;br /&gt;
   END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The resulting PAI appears as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;\X = 1&lt;br /&gt;
 NAME_SN_ALL =&lt;br /&gt;
/X = 1&lt;br /&gt;
\X = 2&lt;br /&gt;
 NAME_SN_LIT =&lt;br /&gt;
 NAME_SN_ALL =&lt;br /&gt;
/X = 2&lt;br /&gt;
\X = 3&lt;br /&gt;
/X = 3&lt;br /&gt;
&lt;br /&gt;
BEGIN&lt;br /&gt;
FR&lt;br /&gt;
   PRINT &#039;# NAME_SN_NONE:  NAME_SN_LIT:  NAME_SN_ALL:&#039;&lt;br /&gt;
FEO:&lt;br /&gt;
      FEO FIELDGROUP X&lt;br /&gt;
         PRINT OCCURRENCE IN FEO AND -&lt;br /&gt;
               NAME_SN_NONE AND NAME_SN_LIT AT 16 -&lt;br /&gt;
AND NAME_SN_ALL AT 30&lt;br /&gt;
      END FOR&lt;br /&gt;
   END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Results in the following: nulls are shown for each field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;# NAME_SN_NONE:  NAME_SN_LIT:  NAME_SN_ALL:&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;You can use the AT-MOST-ONE, REPEATABLE, and EXACTLY-ONE attributes, which are mutually exclusive, to define an individual field or a field that is part of a field group definition. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the AT-MOST-ONE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The AT-MOST-ONE attribute allows you to ensure that there is only one occurrence of a field in any record, without preallocating space for the field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, the AT-MOST-ONE attribute is required for fields in First-Normal Form (1NF) files. AT-MOST-ONE and REPEATABLE fields in 1NF files are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In non-1NF files, if the AT-MOST-ONE attribute is not specified when a field is defined, the REPEATABLE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is defined with the AT-MOST-ONE attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; prevents multiple occurrences of that field in any given record. The AT-MOST-ONE attribute is useful if, for example, you know that there will be one variable-length field per record, or if you have a field that is often left blank but does not have more than one value per record (such as SPOUSE NAME). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike fields with the OCCURS attribute, AT-MOST-ONE fields are not specifically preallocated. The AT-MOST-ONE attribute lets you store these kinds of records without wasting the space required by OCCURS.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the REPEATABLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a field is not defined as AT-MOST-ONE, then it is REPEATABLE. Fields with the REPEATABLE attribute can accept multiple occurrences of the field in the record. Unlike the OCCURS attribute, REPEATABLE does not preallocate fields, nor does REPEATABLE let you specify the number of occurrences of the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the EXACTLY-ONE (EXONE) attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As the name suggests an EXACTLY-ONE attribute in a field definition means that the field always has exactly one occurrence in its record or field group context after the initial data block for the record or field group (STORE RECORD, ADD FIELDGROUP, or INSERT FIELDGROUP). If no explicit value is stored for the field, its value has either the DEFAULT-VALUE for the field or the null string (&#039; &#039;), if no DEFAULT-VALUE was specified for the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot add, insert, or delete an EXACTLY-ONE field, although you can change an EXACTLY-ONE field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The EXACTLY-ONE attribute is not allowed when both the DEFAULT-VALUE and STORE-NULL NONE attributes are specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;EXACTLY-ONE fields with a field group&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The EXACTLY-ONE attribute for a field within a field group means that the field can occur only once inside a single field group occurrence. However, since field groups can occur multiple times in a field group record, an EXACTLY-ONE field inside a field group can occur multiple times inside a field group record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defaults for AT-MOST-ONE, REPEATABLE and EXACTLY- ONE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;REPEATABLE is the default except for 1NF files, where AT-MOST-ONE is required on all fields, except INVISIBLE. See [[#VISIBLE and INVISIBLE attributes|VISIBLE and INVISIBLE attributes]] for informatIon. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The AT-MOST-ONE attribute is required on all fields in a 1NF file because multiply occurring fields violate relational First-Normal Form. The one exception to this rule is for INVISIBLE/REPEATABLE fields in 1NF files. See &amp;lt;b&amp;gt;See&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;See Using the File Model Feature&amp;lt;/b&amp;gt; for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The EXACTLY-ONE attribute is the default frequency of occurrence for a field defined within a field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Enforcing AT-MOST-ONE constraints&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that AT-MOST-ONE field constraints are not violated for the following User Language requests and the Host Language and FLOD counterparts: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ADD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INSERT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STORE RECORD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before the indexes are updated and a new field is added or inserted into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record, all existing fields in the record are checked to ensure that the new field does not create a second occurrence: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a new field violates the AT-MOST-ONE rules, and there is no ON FCC unit, the request is canceled with the following error message:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; validates a field if you REDEFINE it to be AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a violation occurs and there is an ON FCC unit, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; processes the ON unit. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the Host Language Interface, the 202 return code is passed back to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;; in FLOD, the file is marked logically inconsistent. However, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not cancel the request in either case. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AT-MOST-ONE and transaction back out files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Transaction back out must be active for files when defining AT-MOST-ONE fields. If you try to define an AT-MOST-ONE field in a non-TBO file, the DEFINE fails and you receive an error message. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once the field is defined, you can turn Transaction Back Out off in non-1NF files. However, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support strongly recommends that you keep Transaction Back Out set in files containing fields that can cause constraint conflicts (currently AT-MOST-ONE and UNIQUE). If you turn Transaction Back Out off in a file with an AT-MOST-ONE or UNIQUE field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sends you a warning message and a &amp;quot;Do You Really Want To?&amp;quot; prompt.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using FLOD or FILELOAD with AT-MOST-ONE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you use FLOD or FILELOAD to load or modify records that have AT-MOST-ONE fields, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that the new or modified records do not violate AT-MOST-ONE constraints. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; detects and reports all violations of AT-MOST-ONE in one pass of the input data. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; finds any fields that violate the constraints, the following occurs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Error is reported and the new or duplicate field is rejected.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FLOD continues processing the input data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;At the end of the run, the file is marked &amp;quot;logically inconsistent;&amp;quot; that is, the FISTAT parameter is set to X&#039;40&#039;. See &amp;lt;b&amp;gt;See Logically inconsistent files&amp;lt;/b&amp;gt; for more information.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The following error message is issued for each violation:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AT-MOST-ONE in First Normal Form (1NF) files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Using OCCURS 1 in 1NF files:&amp;lt;/b&amp;gt; For 1NF files, where AT-MOST-ONE is required, use OCCURS 1 to save processing time if you are storing a large number of records in which the field is always exactly the same length (such as a Social Security Number). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;INVISIBLE fields in 1NF files:&amp;lt;/b&amp;gt; The First-Normal form relational model cannot be enforced for INVISIBLE fields. However, they are useful within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; for list processing and to support SQL multicolumn keys. (See the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SQL Server User&#039;s Guide for more information.) Therefore, the INVISIBLE field attribute is allowed, but INVISIBLE fields are not mapped to SQL-accessible columns. The following rules and restrictions apply to INVISIBLE fields in 1NF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because the INVISIBLE and AT-MOST-ONE attributes are incompatible, INVISIBLE fields must be defined as REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot REDEFINE a field as INVISIBLE within a 1NF file; you can specify the INVISIBLE and REPEATABLE attributes only with a DEFINE command. In the case of a record security key field, specify the field as INVISIBLE and REPEATABLE using the INITIALIZE command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE fields in 1NF files must also be ORDERED or KEY. NUMERIC RANGE is not legal in a 1NF file and results in an error message)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining AT-MOST-ONE and REPEATABLE fields in non-1NF files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can DEFINE or REDEFINE a field to be AT-MOST-ONE in any non-1NF &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created after Release 9.0. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When redefining a field to AT-MOST-ONE that does not currently have the OCCCURS 1 attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; scans Table B to verify that no multiple occurrences of the field exist in any record. If any field violates the AT-MOST-ONE constraints, the REDEFINE fails and the following error message is displayed for each violation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2122: AT-MOST-ONE CONSTRAINT VIOLATION FOR FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the AT-MOST-ONE or the OCCURS 1 attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although both the AT-MOST-ONE and OCCURS 1 attributes prevent more than one occurrence of a field in a record, they achieve their goal in different ways. For non-1NF files, use either the AT-MOST-ONE or the OCCURS 1 attribute. Using both causes redundant processing. Understanding the advantages of each may help you decide which attribute you want to use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;AT-MOST-ONE attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Does not preallocate the field. Therefore, if the field values between records are of very different lengths or if you do not know the length of the longest record, use AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Allows you to correct violations before the record is stored with the ON FCC unit. If you do not use an ON FCC unit, then a constraint violation cancels the request. Therefore, if it is important to allow users to correct violations, or it is important that the request not be canceled, use AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OCCURS 1 attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocates space for the field in every record. If you are storing a large number of records and the length of the value is generally the same, pre-allocating the field with OCCURS 1 can save you processing time. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cancels the request when a violation occurs. With OCCURS 1, you cannot use an ON FCC unit to correct violations. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other field attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;AT-MOST-ONE is not compatible with the following field attributes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;OCCURS greater than 1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;REPEATABLE&lt;br /&gt;
&amp;lt;p&amp;gt;REPEATABLE is compatible with all field attributes except AT-MOST-ONE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Coordinating AT-MOST-ONE and UNIQUE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;Both AT-MOST-ONE and UNIQUE are examples of field-level constraints. Although the function of the UNIQUE and AT-MOST-ONE attributes appear similar, their actual operations differ.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Affects...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Value of the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of fields per record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if a Social Security field within an EMPLOYEE file is both UNIQUE and AT-MOST-ONE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Ensures that...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Social security number for every employee is different.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Each employee has only one social security number. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Coordinating the use of the AT-MOST-ONE and the UNIQUE attributes increases the integrity and accuracy of your records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFERRABLE and NON-DEFERRABLE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFERRABLE and NON-DEFERRABLE attributes let you specify whether the updates to the index (Tables C and D) for a KEY ORDERED field can be deferred; that is, stored or updated at a later time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFERRABLE attribute is recommended and is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NON-DEFERRABLE attribute is not specified when a field is defined, the DEFERRABLE attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Choosing between DEFERRABLE or NON-DEFERRABLE====&lt;br /&gt;
&amp;lt;p&amp;gt;Under normal circumstances, the storing and updating of records in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is done all at once. That is, Tables B, C, D, E, and X are changed simultaneously. When there is a high volume of updates (for example, a Batch2 process adding large numbers of records), efficiency and space reductions can be gained by deferring the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Under some circumstances, it may be necessary to override this deferral of updates to the index for particular fields. For instance, consider a situation in which new records are added Online to a personnel file. You might be willing to wait a day for the ability to retrieve the new records. The updates to Tables C and D are deferred until a batch processing window (and the application of deferred updates does require exclusive access to the file), when they are done in a batch run. However, when adding new records, you want to ensure that a record containing a duplicate Social Security number (for example) is not added to the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can define the Social Security number field as NON-DEFFERABLE and write a procedure to retrieve any records already in the file that have the new Social Security number and display an error message if one is found. If updates to the index on this field have been deferred, you would not find a duplicate added earlier in the same day. By selecting the NON-DEFERRABLE attribute for the Social Security number field, you can ensure that Tables C and D are updated immediately. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To provide immediate updating in BATCH204 runs, special action must be taken. See &amp;quot;Overriding deferred updates&amp;quot; for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can also detect duplicate Social Security numbers by defining the field with the UNIQUE and ORDERED attributes. See [[#UNIQUE and NON-UNIQUE attributes|UNIQUE and NON-UNIQUE attributes]]&amp;lt;/p&amp;gt;&lt;br /&gt;
====Compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;The DEFERRABLE/NON-DEFERRABLE attribute is invalid for a field that has these attributes: BLOB, CLOB, NON-KEY, NON-ORDERED, and NON-RANGE. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a chart showing valid and invalid attribute combinations, see [[ Field Attribute Combinations#Combining attributes|Combining attributes]]. If you are defining field attributes with FILEMGMT, you will not be allowed to specify incompatible attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Field Constraints&amp;quot;&amp;gt;&lt;br /&gt;
== Field and Content Constraints == &lt;br /&gt;
&lt;br /&gt;
You may set up constraints to prevent &#039;invalid&#039; updates to the file. The updates may be invalid because to permit them would violate rules about the field (a second occurrence to an AT-MOST-ONE field, for example). Or you may set up &#039;content&#039; constraints to prevent values outside of those permitted to be stored.&lt;br /&gt;
&lt;br /&gt;
=== Field Constraints ===      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ON FIELD CONSTRAINT CONFLICT (ON FCC) unit ====&lt;br /&gt;
&lt;br /&gt;
(should probably be mentioned only as a link to UL page) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To help control processing with UNIQUE and AT-MOST-ONE fields, use the User Language ON FCC unit. ON FCC is invoked whenever a field-level constraint conflict, such as an attempt to add a second occurrence of an AT-MOST-ONE field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An ON FCC unit is used with a number of $functions that can help you determine exactly where the field constraint conflict has occurred. The $UPDSTAT function is discussed below. All other $functions for ON FCC are discussed in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;$UPDSTAT function&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The $UPDSTAT function is used in conjunction with the ON FIELD CONSTRAINT CONFLICT unit and field attributes which have field-level constraints of UNIQUE and AT-MOST-ONE. You &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;must&amp;lt;/var&amp;gt; use $UPDSTAT in the ON FCC unit when writing procedures for files that have (or might have in the future) more than one type of field-level constraint defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If $UPDSTAT is invoked from an ON FCC unit following the detection of a field-level constraint conflict, it returns a numeric value denoting the type of conflict that has occurred:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meaning      &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No violation occurred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Uniqueness violation occurred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE violation occurred &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The $UPDSTAT function takes no arguments.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;See information about the [[#AT-MOST-ONE and REPEATABLE attributes|AT-MOST-ONE and REPEATABLE attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;UNIQUE and ORDERED fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses the Ordered Index to process UNIQUE values, fields defined as UNIQUE must also be defined as ORDERED. For more information about the Ordered Index see [[#ORDERED and NON-ORDERED attributes|ORDERED and NON-ORDERED attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====UNIQUE and NON-UNIQUE attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;Defining a field with the UNIQUE attribute allows &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to ensure that a given field name = value pair occurs only once in a file. A Social Security number field is one example that might benefit from having the UNIQUE attribute. The UNIQUE attribute specifies that there can be only one occurrence of a field in the file. Multiple occurrences are not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When storing a field specified as UNIQUE, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; first queries the Ordered Index, looking for an identical field-name-equals-value pair. If it finds an identical value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; issues an error message and does not perform the update. This is true both within a record for multiply occurring fields and between records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is not a uniqueness conflict, that is, if the field-name-equals-value pair being stored is unique, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; completes the update.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the UNIQUE attribute is not specified when a field is defined, the NON-UNIQUE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Unique values in multiply occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a multiply-occurring field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that each occurrence of the field is unique. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Deleting UNIQUE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because UNIQUE values use the Ordered Index, do not use the DELETE ALL RECORDS statement for deleting records. Use DELETE RECORD instead.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A field can only be specified as UNIQUE with the following restrictions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields must be specified as ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields cannot be specified as DEFERRABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields cannot be defined in non-TBO (Transaction Back Out) files. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you attempt to define a UNIQUE key under any of these circumstances, you receive an error message and the field is not defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Defining a LEVEL clause====&lt;br /&gt;
&amp;lt;p&amp;gt;To secure a field against unauthorized access, include a LEVEL clause in the field&#039;s description. &amp;lt;b&amp;gt;See&amp;lt;/b&amp;gt; discusses field-level security and describes the types of field access: SELECT, READ, UPDATE, and ADD. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Field-level security has a negligible impact on both performance and storage usage.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Content Constraints ===&lt;br /&gt;
&lt;br /&gt;
====Setting a pattern for a field value: the LIKE attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a field pattern lets you specify a pattern that a field value must conform to, otherwise it cannot be stored. The patterns you can specify are the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; LIKE patterns. See the chapter on pattern matching in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Guide. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD G WITH LIKE &#039;@@@####&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This specifies that field G must start with three alphabetic characters followed by four numeric characters. An attempt to store a field value that does not conform to the field&#039;s pattern results in request cancellation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can limit a field value to a list of values. For, example, if a field must have a value of &#039;M&#039; or &#039;F&#039; you could code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD SEX WITH LIKE &#039;M,F&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And if you want a BALL field to have a value &#039;SPLITTER&#039;, &#039;CURVE&#039;,  &#039;KNUCKLE&#039;, or &#039;CHANGE UP&#039; you could code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD BALL WITH LIKE -&lt;br /&gt;
 &#039;SPLITTER,CURVE,KNUCKLE,CHANGE UP&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The maximum pattern length is 47 characters. The maximum default value length is 31 characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As with the IS LIKE operator in User Language, the patterns are always applied to numbers after conversion to a string.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot use the LIKE attribute to define an automatic field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Range constraints====&lt;br /&gt;
&amp;lt;p&amp;gt;You can set range constraints on fields using the range attributes. Each set of range attributes is comprised of three or four attributes that you can use to establish a range for field length values, integer values, float values, or date/time stamp values. The types of range attributes are mutually exclusive. For example, you cannot define a field with the LENGTH-GE and INTEGER-LE attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The range constraints are self-editing. If you define a field with LENGTH LE 6 and LENGTH GE 8, the definition is rejected and an error message is issued.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When a range constraint is redefined, it replaces the existing field constraint.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note::&amp;lt;/b&amp;gt; The range constraints do not have to match the data type of the stored field. That is, you can have a date/time constraint for a STRING field or an integer constraint for a FLOAT field, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Defining fields with length constraints=====&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Length constraint attributes &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Range&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-EQ &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the required length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the minimum length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the maximum length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following field definitions illustrate using the length constraint attributes, LENGTH-EQ, LENGTH-GE, and LENGTH-LE, with each other and/or with other attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD A WITH LENGTH-EQ 8 BINARY OCCURS 1&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD B WITH LENGTH-GE 4 FLOAT LEN 8&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD C WITH LENGTH-LE 10&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD D WITH LENGTH-LE 10 LENGTH-GE 3&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD E WITH LENGTH-LE 6 LENGTH-GE 6 BINARY&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD F WITH LENGTH-LE 255 LENGTH-GE 0&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD COLOR WITH EXACTLY-ONE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The length constraints apply to the string representation of non-string types as they would be stored in the database. This means that the length of a FLOAT field with value 34.000 would be 2 because after being stored in the database it will return 34 on a retrieval.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====LENGTH-EQ (LEQ) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-EQ attribute is followed by a number from 0 to 255 that indicates the required length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-EQ attribute is not allowed for automatic fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====LENGTH-GE (LGE) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-GE attribute is followed by a number from 0 to 255 that indicates the minimum length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-GE attribute is not allowed for automatic fields. You can pair the LGE attribute with the LLE attribute, creating a length range. However, if the range is not valid or overlaps, an error message is invoked.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====LENGTH-LE (LLE) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-LE attribute is followed by a number from 0 to 255 that indicates the maximum length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The LENGTH-LE attribute is not allowed for automatic fields. You can pair the LLE attribute with the LGE attribute, creating a length range. However, if the range is not valid or overlaps, an error message is invoked.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====Setting an integer value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;For Integer values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Integer attribute &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies that the integer value must be...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-LT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for a field must be an integer with a value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD NCHILDREN WITH INTEGER-LE 100&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The NCHILDREN field can have an integer value of less than or equal to 100.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; An integer constraint will not accept a value that would be stored with a decimal place. If you have an integer constraint INTEGER-GE 10 and try to store value 10.0, it will fail because 10.0 is not an integer.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====INTEGER-GE (INTGE), INTEGER-GT (INTGT), INTEGER-LE (INTLE) and INTEGER-LT (INTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;The integer range attributes-INTGE, INTGT, INTLE, INTLT-can be defined singly or as a pair on a field. The integer range attributes establish a range of acceptable integer values for the field. If a record is added with an integer value that is not within the range, the record is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify another type of range attribute on the same field, such as DATETIME-LE or FLOAT-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
=====Setting a float value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;For float values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Float attribute &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies that the float value must be...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-LT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for a field must be a floating point value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WEIGHT WITH FLOAT-GT 10.5&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The WEIGHT field must have a float value greater than 10.5. &amp;lt;/p&amp;gt;&lt;br /&gt;
=====FLOAT-GE (FLTGE), FLOAT-GT (FLTGT), FLOAT-LE (FLTLE) and FLOAT-LT (FLTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;The float range attributes-FLTGE, FLTGT, FLTLE, FLTLT-can be defined singly or as a pair on a field. The float range attributes establish a range of acceptable float values for the field. If a record is added with a float value that is not within the range, the record is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify another type of range attribute on the same field, such as DATETIME-LE or INTEGER-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
=====Setting a date/time value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;For date/time values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Date/time attribute &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies that the date/time value must be...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Later than or the same as the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Later than the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Earlier or equal to the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-LT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Earlier than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for field must be a date/time value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD BIRTHDATE WITH DATETIME-GE 18900101 -&lt;br /&gt;
                               DATETIME-LT 20100101&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BIRTHEDATE field is required to have a date/time value greater than or equal to January 1, 1890 and less than January 1, 2010. As with any other date/time values, the values can be extended with HH, HHMM, HHMMSS, HHMMSSX, HHMMSSXX, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
=====DATETIME-GE (DTGE), DATETIME-GT (DTGT), DATETIME-LE (DTLE), and DATETIME-LT (DTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;The date/time range attributes-DTGE, DTGT, DTLE, DTLT-establish a range of acceptable dates for the value of the field. If a record is added with a date that is not within the range, the record is rejected. You can specify a single date/time range attribute or a pair of them on a field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify another type of range attribute on the same field, such as FLOAT-LE or INTEGER-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value stored for a field must be a date/time with a value that has the proper relationship to the following value. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD BIRTHDATE WITH DATETIME-GE 18900101 -&lt;br /&gt;
 DATETIME-LT 20100101&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BIRTHDATE field is required to have a date/time value greater than or equal to January 1, 1890 and less than January 1, 2010. As with any other date/time values, the values can be extended with HH, HHMM, HHMMSS, HHMMSSX, HHMMSSXX, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Concatenated Fields ==&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that make up concatenated field values must be either AT-MOST-ONE, EXACTLY-ONE, or OCCURS 1 and must all be in the same field group context (including no field group). FIELDGROUP * are not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields defined with range attributes cannot be used in concatenation processing. For more information on this, see &amp;quot;Range Constraints&amp;quot; on [[|]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following syntax is used to define a concatenated field with a separator and an escape character:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD fieldname WITH CONCATENATION-OF -&lt;br /&gt;
 field1 WITH field2 [WITH field3 [WITH field4 -&lt;br /&gt;
 [AND . . .]]] -&lt;br /&gt;
 [SEPARATOR (char | X&#039;hex&#039; | NONE)] -&lt;br /&gt;
 [ESCAPE (char | X&#039;hex&#039; | CANCEL)] &lt;br /&gt;
 [OtherAttributes . . .]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The SEPARATOR character appears between the field values that comprise the concatenated field. Up to eight fields may be defined for a concatenated field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Concatenated fields could be longer than 255 bytes after adding separator characters and escaping results in request cancellation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Concatenated fields have the following field attribute support.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Concatenated field attributes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Purpose&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CONCATENATION-OF (CAT) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;List the fields that make up that concatenated field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ESCAPE (ESC) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies a character that is used to escape separator characters that occur in a field that requires a terminating separator character&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SEPARATOR (SEP) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies the character that terminates fields that do not have a fixed length and are not the last field in the concatenation&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a required attribute is not assigned a value, the default value is used. For example, if you define a CONCATENATEION-OF field, which requires the SEPARATOR attribute, and you do not enter the SEPARATOR attribute, the default value of X&#039;00&#039; is used as the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
===CONCATENATION-OF (CAT) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The CONCATENATION-OF (CAT) attribute is followed by a list of fields that make up that concatenated field. At least two are required and up to eight are allowed. The field names must be separated by the word WITH and subsequent field attributes must be separated from the list by the word AND. Each field specified in the list of concatenated fields must have the EXACTLY-ONE attribute specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ESCAPE (ESC) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The ESC attribute is followed by one of the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single character in C&#039;&amp;amp;lt;char&amp;gt;&#039; or X&#039;&amp;amp;lt;hex&amp;gt;&#039; format that specifies the character that is used to escape separator characters that occur in a field that requires a terminating separator character. In addition to escaping the separator character, the escape character can also escape itself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CANCEL, which means that an attempt to store a separator character in a field that requires a terminating separator results in request cancellation.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default ESCAPE character is X&#039;01&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define an ESCAPE value for a field, you cannot redefine the ESCAPE value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ESCAPE character cannot match the SEPARATOR character. The ESCAPE character is always displayed on DISPLAY FIELD output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ESCAPE attribute is not allowed on a field definition, if the SEPARATOR NONE attribute is specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the ESCAPE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ESC character is inserted into a concatenated field when the real data being added to the database contains the SEPARATOR or the ESCAPE character itself. When reading in stored values, programs use the ESC character to differentiate between the special characters and normal data that happens to include the special characters. When the processing encounters the ESCAPE character in a concatenated field, it knows that the next character is real data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The ESCAPE character applies to all fields except the last field in the concatenation. The programmer is expected to know how many components comprise the concatenation and therefore, special characters occurring in the last component must be real data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Consider the following field definitions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD A_CONCAT_TEST1 WITH AT-MOST-ONE&lt;br /&gt;
DEFINE FIELD A_CONCAT_TEST2 WITH AT-MOST-ONE&lt;br /&gt;
DEFINE FIELD A_CONCAT_TEST3 WITH CONCATENATION-OF -&lt;br /&gt;
             A_CONCAT_TEST1 WITH -&lt;br /&gt;
             A_CONCAT_TEST2 AND  -&lt;br /&gt;
             SEPARATOR  C&#039;+&#039;     -&lt;br /&gt;
             ESCAPE     C&#039;/&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If we then do:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
IN POLICIES STORE RECORD&lt;br /&gt;
                  A_CONCAT_TEST1 = 1ST+VALUE+&lt;br /&gt;
                  A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
            END STORE&lt;br /&gt;
FRN $CURREC&lt;br /&gt;
    NP&lt;br /&gt;
    PAI&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;We get:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST+VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
A_CONCAT_TEST3 = 1ST/+VALUE/++2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The plus signs in the stored records are intentionally part of the data. For the concatenated field &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores the escape character preceding the plus signs in the data for all but the last field in the concatenation. This assumes that the programmer knows how many fields there are in the concatenation and therefore knows that any separator characters in the last field are data fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In storing the escape character immediately before any plus signs that are part of the data proper, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; tells the programmer that they are to be read as data. If there were any escape characters in the data proper, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; puts an escape character before the data proper version as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
IN POLICIES STORE RECORD&lt;br /&gt;
                  A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
                  A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
            END STORE&lt;br /&gt;
FRN $CURREC&lt;br /&gt;
    NP&lt;br /&gt;
    PAI&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;... giving the output ...&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
A_CONCAT_TEST3 = 1ST//VALUE/++2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you do not want either the separator or the escape character in the concatenated field, you can enforce this by assigning the value &#039;CANCEL&#039; as the escape character as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD A_CONCAT_TEST1 WITH CONCATENATION-OF -&lt;br /&gt;
             A_CONCAT_TEST1 WITH                  -&lt;br /&gt;
             A_CONCAT_TEST2 AND                   -&lt;br /&gt;
             SEPARATOR C&#039;+&#039;                       -&lt;br /&gt;
             ESCAPE CANCEL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In which case, the concatenation will be ignored and our STORE record results in the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; There are no error messages associated with this condition.&amp;lt;/p&amp;gt;&lt;br /&gt;
===SEPARATOR (SEP) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;The SEP attribute is followed by one of the following options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single character in C&#039;&amp;amp;amp;lt;char&amp;gt;&#039; or an X&#039;&amp;amp;amp;lt;hex&amp;gt;&#039; format that specifies the character that terminates fields that do not have a fixed length and are not the last field in the concatenation. The separator character is always used between field values, regardless of any length constraints on the component fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The NONE option that means the fields in the concatenation are concatenated end to end with no separator character and regardless of their length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you define a field with the SEP attribute, you must supply a value. Otherwise, the following error is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE MAKE_MODEL WITH CONCATENATION-OF MAKE WITH MODEL - AND ORD SEP ESC CANCEL&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** 1 M204.0405: INVALID DEFINE OPTION: SEP ESC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you define a field without the SEP attribute, it defaults to X:00:, as shown in the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE MAKE_MODEL WITH CONCATENATION-OF MAKE WITH MODEL -&lt;br /&gt;
 AND ORD ESC CANCEL&lt;br /&gt;
&lt;br /&gt;
D FIELD (ABBREV) MAKE_MODEL&lt;br /&gt;
MAKE_MODEL&lt;br /&gt;
 (DEF NFRV NKEY NCOD STR NNR VIS UP ORD CHAR LRES 15 -&lt;br /&gt;
 NRES 15 SPLT 50 IMM 1 NUNIQ ONE CAT MAKE WITH MODEL AND -&lt;br /&gt;
 SEP X&#039;00&#039; EXC CANCEL)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define a SEPARATOR value for a field, you cannot redefine the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The SEPARATOR character cannot match the ESCAPE character. The SEPARATOR character is always displayed on DISPLAY FIELD output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the SEPARATOR NONE attribute is specified on a field definition, the ESCAPE attribute is not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Defining concatenated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Using the fields defined in [[|]] and the following fields, you can define concatenated fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD COLMOD WITH CONCATENATION-OF COLOR -&lt;br /&gt;
WITH MODEL AND SEP C&#039;-&#039; ESC C&#039;+&#039;&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MODCOL WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR AND SEP C&#039;$&#039; ESC C&#039;*&#039;&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MODCOLI WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MCY WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR WITH YEAR AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD COLCNT WITH CONCATENATION-OF COLOR -&lt;br /&gt;
WITH COUNTRY AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD CNTYR WITH CONCATENATION-OF YEAR -&lt;br /&gt;
WITH COUNTRY AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Defining concatenated fields in a field group context===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD BATTERS&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELDGROUP STARTERS&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD NTRIP WITH CTO STARTERS AND EXACTLY-ONE&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD A WITH AT-MOST-ONE FIELDGROUP STARTERS AND-&lt;br /&gt;
ORDERED CHARACTER&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD B WITH AT-MOST-ONE FIELDGROUP STARTERS AND -&lt;br /&gt;
KEY&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD C WITH AT-MOST-ONE FIELDGROUP STARTERS AND &lt;br /&gt;
ORDERED NUMERIC&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD AB WITH FIELDGROUP STARTERS AND -&lt;br /&gt;
CONCATENATION-OF A WITH B AND SEP C&#039;/&#039;&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD ABO WITH FIELDGROUP STARTERS AND -&lt;br /&gt;
CONCATENATION-OF B WITH A AND SEP C&#039;+&#039; ORDERED&lt;br /&gt;
&lt;br /&gt;
IN FILE REDSOX DEFINE FIELD ABI WITH CONCATENATION-OF B WITH A AND -&lt;br /&gt;
SEP C&#039;+&#039; ORDERED INVISIBLE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; A field in a concatenated field value does not have a terminating separator set only if it is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Last field in the concatenation, or&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed length (LENGTH-EQ set) and the default value has the same length as LENGTH-EQ.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you specify the ESCAPE CANCEL attribute for a field and the SEPARATOR character for that field is in one of the field values for the concatenated string, the update is cancelled. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Automatic Fields&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Automatic Fields == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; now lets you define a field whose value is automatically maintained. For example, a field may count occurrences of another field so that every store or delete of the field occurrence changes the count in the automatic field. The automatic fields are fields defined with the following attributes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;COUNT-OCCURRENCES-OF&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of an automatic field is updated at the start of a transaction by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and you cannot set it explicitly by a program. Any valid update causes the appropriate time and user stamps to be updated. For example, DELETE FOO(8). when there are no occurrences of FOO in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Once you define an automatic value for a field, you cannot redefine the automatic value.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Automatic Field Context===&lt;br /&gt;
&amp;lt;p&amp;gt;Automatic fields may operate in a record or Repeating Field Group context. Take the following set of fields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;...&lt;br /&gt;
DEFINE FIELDGROUP ADDRESS&lt;br /&gt;
...&lt;br /&gt;
DEFINE FIELD RECORD.UPDT.TIME (DATETIME UPDT-TIME)&lt;br /&gt;
DEFINE FIELD ADDRESS.LINE.1 (SN NONE FG ADDRESS)&lt;br /&gt;
...&lt;br /&gt;
DEFINE FIELD ADDRESS.UPDT.TIME (DATETIME FG ADDRESS AND UPDT-TIME)   &lt;br /&gt;
...&amp;lt;/P&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Any update to any field in a record will automatically update RECORD.UPDT.TIME&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Any update to any field in an occurrence of the ADDRESS field group will cause the ADDRESS.UPDT.TIME for that occurrence to be updated. (And, of course, the record level RECORD.UPDT.TIME as well.) &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rules for the definition of Automatic Fields===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;COUNT-OCCURRENCES-OF (CTO) attribute&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;p&amp;gt;The COUNT-OCCURRENCES-OF (CTO) attribute is not allowed for fields defined as REPEATABLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because one of the major advantages of CTO fields is to avoid unnecessary record scans, it is highly recommended that the field be preallocated. Otherwise the field is stored and updated in Table B in the normal way.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Field Design (File Management)#Counting occurrences of a field|Counting occurrences of a field]] for details on its use.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other automatic fields&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All other automatic fields, capture the add/update user/time as of the start of the transaction. Any of these attributes may be be added to empty or non-empty fields (via a [[REDEFINE command]]). The value is maintained by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; processing, so you cannot change the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These automatic attributes may net be defined as REPEATABLE (the default is AT-MOST-ONE).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Field Design (File Management)#Tracking updates using automatic fields|Tracking updates using automatic fields]] for details on their use.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying automatic fields===&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify the AT-MOST-ONE or EXACTLY-ONE attribute for an automatic field. These attributes affect the order in which the fields are displayed on a PAI statement. EXACTLY-ONE fields are displayed in the order they were defined, whereas AT-MOST-ONE fields are displayed in the order they are stored in Table B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Currently Table B stores automatic fields in the following order:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;UPDATE-TIME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Counting occurrences of a field===&lt;br /&gt;
&amp;lt;p&amp;gt;To create such a field you use the COUNT-OCCURRENCES-OF (CTO) keyword on a field definition followed by the name of the field that the field or field group for which the count is automatically maintained. For example, if you have field group DRUG you could define an automatic count field as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP DRUG&lt;br /&gt;
DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot define a CTO field in a file that has had records already added to it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You could also make the automatic count field a binary field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH CTO DRUG AND BINARY OCCURS 1&lt;br /&gt;
DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG AND -&lt;br /&gt;
BINARY&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; AND is a separator between a field or field group name and other field attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An automatic count field can also be an OCCURS 1 field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG AND BINARY OCCURS 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An automatic counter field could even be ORDERED, KEY or NUMERIC RANGE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH CTO DRUG AND BINARY OCCURS 1 ORDERED NUMERIC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can find all records with N occurrences of field group DRUG. Or, you can find those that have more or less than some number of occurrences.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Limitations on COUNT-OCCURRENCES-OF (CTO) fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields defined with the CTO attribute cannot also have the UPDATE AT END attribute. You cannot define a CTO field that counts occurrences of UPDATE AT END fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot use a CTO field to count occurrences of OCCURS fields, even though the OCCURS count is greater than 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also, you cannot define a CTO field in a file that has had records already added to it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There is a maximum of one CTO field per field or field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Retrieving the value of a CTO field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can retrieve values of CTO fields via the field name (as with any VISIBLE field), as in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PRINT DRUGCT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%DRUGCT = DRUGCT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Automatic optimization with COUNT OCCURRENCES OF fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The use of CTO fields automatically optimizes many of the record scan processes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Operations on Multiply Occurring Fields#FOR EACH OCCURRENCE OF loops|FOR EACH OCCURRENCE OF]] loops. &lt;br /&gt;
&amp;lt;p&amp;gt;If a CTO field exists for the field or field group that is being looped over via an FEO or FAO statement, the value of that field limits the number of times the loop is processed, which reduces the need to scan to the end of record for every FEO or FAO statement. Note that when a record is updated or might be updated mid-loop, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; normal concerns about subscript handling in these statements need to be considered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FOR FIELDGROUP clause&lt;br /&gt;
&amp;lt;p&amp;gt;Before processing a FOR FIELDGROUP loop, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks whether the requested occurrence is in the record based on the CTO field. If the User Language request is for occurrence 3, but the CTO field indicates only two occurrences in the record, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stops processing the FOR loop.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field extraction&lt;br /&gt;
&amp;lt;p&amp;gt;Before extracting a field &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks whether the requested occurrence is in the record based on the CTO field. If the User Language request is occurrence 3, but the CTO field indicates only two occurrences in the record, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sets the result to null (or NOT PRESENT). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note the in the case of the subscripted field optimization:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;       FOR %I FROM 1 TO %N&lt;br /&gt;
          %FOO = FOOFIELD(%N)&lt;br /&gt;
       END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks only the number of occurrences on the first iteration of the loop.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In all cases, the greatest benefit from the CTO field optimization is when a record contains no occurrences of the requested field or field group. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; immediately determines that no occurrence is on the record and stops scanning the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining an efficient CTO field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The counter fields are always physically present in the record. Using a DEFAULT-VALUE of zero for such a field defeats its purpose as you need to scan the entire record to determine whether to use the default value. When you issue a STORE RECORD statement, all CTO fields are stored as 0 in the record. For non-OCCURS, fields are always the first variable length fields in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support recommends that you define a CTO field as BINARY OCCURS 1, as these require only four bytes per record, whereas the minimum length of a variable length field is four bytes (for a compressed 0) and will be at least five for any non-zero value. A CTO field inside a field group cannot be an OCCURS field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The absolute maximum value for CTO fields is currently X&#039;3FFFFFFF&#039; or 1,073,741,823 since BINARY fields use the high order two bits to distinguish values from coded values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot update CTO fields; attempts are caught at compile-time for explicit file-context references and at run-time for group-context and field-name variables. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;CTO fields can even be in field groups and zeros are stored for CTO fields when the ADD FIELDGROUP or INSERT FIELDGROUP statement is processed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Displaying CTO fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By default, the PRINT ALL INFORMATION (PAI), AUDIT ALL INFORMATION (AAI), PRINT ALL FIELD GROUP INFORMATION (PAFGI), and AUDIT ALL FIELDGROUP INFORMATION (AAFGI) statements do not display CTO (counter fields). When you are using PAI [INTO] to reorganize your files or to copy records, the automatic fields are likely to cause problems.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Under other circumstances you can use the argument to indicate that you do want automatic fields to be printed by these statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tracking updates using automatic fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can now track the date/time when a record was created or updated and what user ID created or updated it. This can be accomplished by using one of the following field tracking attributes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Tracking attribute &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Tracks the...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-TIME &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was created using machine time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-TIMEUTC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was created using Coordinated Universal Time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-USER &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User ID that created the record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-TIME &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was updated using machine time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-TIMEUTC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was updated using Coordinated Universal Time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-USER &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User ID that updated the record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All of the automatic fields that contain date/time information also have the DATETIME attribute. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot update tracking fields with User Language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A record or field group can contain only a single field of each update tracing type (CREAT-USER, UPDATE-USER, CREATE-TIME, UPDATE-TIME). An attempt to create a second invokes an error message.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can define update tracking fields (CREATE-TIME, UPDATE-TIME, CREATE-USER, UPDATE-USER) in an already populated file, even an update tracking field for the main records or a field group that already has occurrences. You can also define a DEFAULT-VALUE field, which defaults to a null string. This lets you define such fields with or without a reorganization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Tracking fields for records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The file itself may have a single field defined for each of the tracking fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An attempt to define a second field of the same type on the file results in an error message, for example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD RECORD.CREATE.TIME WITH CREATE-TIME&lt;br /&gt;
DEFINE FIELD RECORD.CREATE-TIME2 WITH CREATE-TIME&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2866: FILE ALREADY HAS A CREATE-TIME FIELD&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UPDATE tracking fields for the records are updated when any field in the record changes and the create tracking fields are added to the record when it is initially stored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Tracking fields for field groups&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Automatic tracking fields can also provide a date/time and user stamp of the creator and last update of each occurrence of a field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If an UPDATE-TIME tracking field is defined as a part of the field group as shown below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD MY_UPDATE_TIME WITH FIELDGROUP X AND -&lt;br /&gt;
                                ORD NUM UPDATE-TIME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;then each occurrence of field group X will contain the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting a date/time field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DATETIME attribute indicates the format of the data stored in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can now define a field with a DATETIME attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH DATETIME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DATETIME fields use seven bytes to store the value (plus four bytes overhead, if the field is not preallocated). A binary representation is used to store the 20-character full date format so that it can be held in seven bytes. the DATETIME attribute may not be combined with KEY. You assign a string to it in &amp;lt;var&amp;gt;YYYYMMDDHHMMSSXXXXXX&amp;lt;/var&amp;gt; format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE FOO DEFINE FIELD WHEN WITH DATETIME&lt;br /&gt;
...&lt;br /&gt;
BEGIN&lt;br /&gt;
  IN FILE FOO STORE RECORD&lt;br /&gt;
    WHEN = &#039;2010070413470643516378&#039;&lt;br /&gt;
  END STORE&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you attempt to store the field with invalid data such as, WHEN = &#039;72&#039;, the request will be cancelled and you will receive an error:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;***  1  CANCELLING REQUEST: M204.2865: ATTEMPT TO ADD INVALID DATETIME VALUE: WHEN = 72&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As most timestamps do not require microseconds, you can specify 10ths, 100ths, 1,000ths, 10,000ths and 100,000ths of a second. The value is simply padded on the right with zeros. For date/time field WHEN, the following are all equivalent:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704134706000000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070413470600000&#039;&lt;br /&gt;
ADD WHEN = &#039;200907041347060000&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704134706000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070413470600&#039;&lt;br /&gt;
ADD WHEN = &#039;200907041347060&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704134706&#039;&lt;br /&gt;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, you can leave off seconds, minutes or hours so the following are all equivalent:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704000000&#039;&lt;br /&gt;
ADD WHEN = &#039;200907040000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070400&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which are also, of course, equivalent to&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704000000000000&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing dates or date/times efficiently&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The shortest valid format for a field with the DATETIME attribute contains YYYYMMDD. If the values you are storing are simple dates, they can be stored in four bytes as binary values, so requires three fewer bytes per value than a date/time field. However, for anything with a time in it (even just hours), a DATETIME field takes less space than the alternative field types (FLOAT or STRING).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Automatic validation of date/times&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to the compact storage of date/time stamps, DATETIME fields also provide automatic validation of the values stored into them. That is, you cannot store numbers into them that are not valid dates. For example, you cannot store &#039;9999111&#039; into a DATETIME field, nor can you store &#039;20070931&#039; (because September does not have 31 days), nor can you store &#039;20070229&#039; (because 2007 is not a leap year, so February only has 28 days).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DATETIME fields also provide for field content validation for DATETIME fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; It is possible to set a DATETIME DEFAULT-VALUE to an invalid date/time value, such as &#039;_&#039;, and to set a DATETIME field to that value. That value will not be stored in the database and the value returned for an EXACTLY-ONE field value that had not been set would be the default value in such a case.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value returned for DATETIME fields is always in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;YYYYMMDDHHMMSSXXXXXX&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are interested in only part of the time stamp, you can either use the $SUBSTR function to get the part you want or make the %variable that will hold the time stamp length you are interested in. So, if you want %WHEN to hold a date/time in YYYYMMDDHHMISS format, simply declare %WHEN as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%WHEN IS STRING LEN 14&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
%WHEN = WHEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DATETIME values can be indexed either as ORDERED CHARACTER or ORDERED NUMERIC. When indexed as ORDERED NUMERIC, only the first 15 digits (&amp;lt;var&amp;gt;YYYYMMDDHHMISSX&amp;lt;/var&amp;gt;) are indexed. When a DATETIME field is indexed as ORDERED CHARACTER, it is indexed as the string representation of the date/time value in the full &amp;lt;var&amp;gt;YYYYMMDDHHMISSXXXXXX&amp;lt;/var&amp;gt; format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Making DATETIME fields KEY fields is not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Update processing&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Date/time values are the date/time of the start of the update processing, so all records, fields and field groups updated by a single update get the same time stamp. Furthermore, the code that starts an update unit ensures that the date/time stamp of each update unit is unique.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The M204.0173 and M204.0172 messages were expanded to include the date/time stamp.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0173: START OF UPDATE 12 AT 10:11:00.51 (20090705101100511734)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0172: END OF UPDATE 12 AT 10:11:00.56 (20090705101100511734)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining various UPDATE-USER fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To indicate whether an update tracking field applies to a record or field group, specify or do not specify the containing field group on the field definition. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHO WITH UPDATE-USER&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The WHO field contains the user ID of the last user that updated anything in the record. The following example illustrates defining an UPDATE-USER field in a field group:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DR.WHO WITH UPDATE-USER FIELDGROUP DR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DR.WHO field contains the user ID of the last user that updated an occurrence of field group DR.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Defining various UPDATE-TIME fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can specify an update tracking field as FIELDGROUP *, which means that all field groups and the primary record all use the same update tracking field. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH UPDATE-TIME FIELDGROUP *&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The WHEN field is placed in the primary record and each field group to track the last update time. If a file has a FIELDGROUP * update tracking field and a field group or record has a different comparable updating tracking field, the field group or the record specific tracking field applies to the field. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH UPDATE-TIME FIELDGROUP *&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD MAIN.WHEN WITH UPDATE-TIME OCCURS 1&lt;br /&gt;
&lt;br /&gt;
DEFINE FIELD FOO.WHEN WITH UPDATE-TIME FIELDGROUP FOO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The field WHEN would be updated for changes to any field group occurrences in field groups that do not have their own UPDATE-TIME field defined.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The Field MAIN.WHEN would be set for any update to any field in the record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The field FOO.WHEN would be set in field group FOO for any update to a field group occurrence.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UPDATE-TIME field in a field group that has a nested field group will be updated when the nested field group is updated, even though no fields in the containing field group were updated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An alternate approach to adding a date-time stamp field to your files===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is a more general way you can include a date-time stamp field in your files. The date/time stamp feature lets you put a date-time stamp (DTS) on each record that was updated in a transaction. You can then use the data in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date/time stamp&amp;lt;/var&amp;gt; field in an end-user written application to find and process all the rows of data that were changed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An application that processes these records can track the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date/time stamp&amp;lt;/var&amp;gt; field values that have been processed to date, or it may take another action, including updating the date/time stamp field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To install and use this functionality, see [[Setting Up the Date-Time Stamp Field]]. Once installed, the date-time stamp feature works only in files created in V6R1.0 or later. See [[Adding a Date-Time Stamp field]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; There is no support in PQO/204 for the data/time stamp feature.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Difference between the system wide date-time stamp field and an UPDATE-TIME field====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Besides the obvious difference that the date-time stamp field will (and must) have the same name in every file in which it is used, the following are the notable differences between the two approaches:&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* The UPDATE-TIME attribute can be set to track updates to Repeating Field Groups, as well as at the record level.&lt;br /&gt;
* The UPDATE-TIME captures the time at the start of an update unit, the date-time stamp field captures the time at the commit point.&lt;br /&gt;
* The date-time stamp field updates may be [[#Suspending date-time stamp updates|temporarily suspended]].&lt;br /&gt;
&lt;br /&gt;
== Assigning Fields to Repeating Field Groups (RFGs) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FIELDGROUP attribute===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;No default, can be abbreviated as &#039;FG&#039;. Available in Model 204 V7R5&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FIELDGROUP attribute specifies the name of the field group that the&lt;br /&gt;
defined field is associated with (contained in). Once you define a FIELDGROUP&lt;br /&gt;
value for a field, you cannot redefine the FIELDGROUP value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FIELDGROUP attribute can not refer to a fieldgroupname that has not yet been defined to the file (the [[DEFINE FIELDGROUP command]] must occur before the [[DEFINE FIELD command]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Syntax===&lt;br /&gt;
:FIELDGROUP [fieldgroupname|*]&lt;br /&gt;
&lt;br /&gt;
The FIELDGROUP attribute does not allow:&lt;br /&gt;
&lt;br /&gt;
* Record security&lt;br /&gt;
* Use for SORT or HASH file&lt;br /&gt;
* 1NF file model&lt;br /&gt;
The FIELDGROUP attribute can be used with the STORE-NULL LITERAL&lt;br /&gt;
attribute.&lt;br /&gt;
&lt;br /&gt;
===Using FIELDGROUP * ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FIELDGROUP * attribute means that the field will be included into all&lt;br /&gt;
field groups. The EXACTLY-ONE attribute conflicts with the FIELDGROUP * attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Field Naming&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Field Naming ==&lt;br /&gt;
&lt;br /&gt;
The rules for field and fieldgroup naming are contained in [[Field Names]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Adding_a_date-time_stamp_field&amp;diff=59495</id>
		<title>Adding a date-time stamp field</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Adding_a_date-time_stamp_field&amp;diff=59495"/>
		<updated>2013-05-14T23:05:34Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Overview of the date-time stamp feature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;You can add a date-time stamp field to your files to keep track of when records in the file were last modified. The date-time stamp feature lets you put a date-time stamp (DTS) on each record that was updated in a transaction. You can then use the data in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date-time stamp&amp;lt;/var&amp;gt; field in an end-user written application to find and process all the rows of data that were changed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An application that processes these records can track the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date-time stamp&amp;lt;/var&amp;gt; field values that have been processed to date, or it may take another action, including updating the date-time stamp field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To install and use this functionality, you must obtain the correct decrypt keys and install this release. After it is installed, the date-time stamp feature works only in files created in V6R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; There is no support in PQO/204 for the date/time stamp feature.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Overview of the date-time stamp feature==&lt;br /&gt;
&amp;lt;p&amp;gt;The date-time stamp (DTS) feature in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can track when records are modified. The DTS feature is implemented on a file-by-file basis.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Except for DELETE RECORD(S) processing, all other updates are captured, including those made by BATCH204 and ONLINE jobs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The default date-time stamp format uses the operating system timestamp value. If your site prefers a different field value or a different data format, consult your Rocket Model 204 installation guide to customize the date-time stamp field name and to activate the date-time stamp feature.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Also of note:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The DTS feature is implemented on a file-by-file basis.&lt;br /&gt;
* Precision and accuracy of the date-time stamp is to the millisecond when you use the date-time stamp as delivered. Rocket Software recommends that the date-time stamp field be defined as ORDERED CHARACTER to support ordered index FIND processing. (The length of this field is 17 bytes.)&lt;br /&gt;
* While it should not be updated directly, you can read and display the date-time stamp as you can any other field. User Language and IFAM may both be used to find and display date-time stamp field data &lt;br /&gt;
* The date-time stamp field is updated at the beginning of commit processing when a new record is stored or an existing record is updated: changes, inserts, or deletes to fields or fieldgroups.&lt;br /&gt;
* You can exclude a user thread from date-time stamp field maintenance by resetting the DTS parameter to 0.&lt;br /&gt;
&amp;lt;p&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extracting date-time stamp field data==&lt;br /&gt;
&amp;lt;p&amp;gt;Since the date-time stamp field is a normal &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; field, all methods of extraction may be used.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Date-time stamp field in User Language===&lt;br /&gt;
&amp;lt;p&amp;gt;The date-time stamp field may be:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Read and printed either as a field name reference or through a $function.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Searched in normal FIND statements.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Assigned to %variables or other fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Printed as supported for all &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; fields, including a PAI statement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Date-time stamp field and OPEN processing===&lt;br /&gt;
&amp;lt;p&amp;gt;If the specified date-time stamp field name is not defined in a date-time stamp file, an OPEN command is rejected. If the date-time stamp field name is DATE.TIMESTAMP, for example, the following messages are issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;gt; OPEN DTSFILE&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  1  M204.1265: NO SUCH FIELD NAME. FIELD = DATE.TIMESTAMP&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2730: DATE/TIME STAMP FILE, BUT DTSFN NOT DEFINED IN FILE&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.0608: FILE CLOSED: DTSFILE&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  2  M204.0630: FILE OPEN COMMAND REJECTED&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you do not set the DTSFN system parameter, files with FOPT=X&#039;10&#039; cannot be opened. An OPEN command will not be processed and the following message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2729: DATE/TIME STAMP FILE, BUT DTSFN UNSPECIFIED IN RUN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you have reset DTS to 0, you must open DTS enabled files with file manager privileges. Otherwise, the open is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Date-time stamp considerations==&lt;br /&gt;
===Backup and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;If any errors occur during processing, the transaction is backed out.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Backup and recovery activity synchronize the date-time stamp with the data changes made. Date-time stamp field updates are part of your updating transaction and follow the normal &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; rules for BACKOUT, COMMIT, DUMP, RESTORE, ROLL BACK, and ROLL FORWARD.&amp;lt;/p&amp;gt;&lt;br /&gt;
===File load utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;FLOD and FASTLOAD do not update the date-time stamp values. However, you can manually update date-time stamp values as you might update another field name value pair.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Procedures with more than one request===&lt;br /&gt;
&amp;lt;p&amp;gt;If there are two requests in one procedure, for example, and neither COMMIT nor CLOSE is called between the two, then both requests are one transaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following procedure has two requests. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
   STORE a record in a DTS file&lt;br /&gt;
END&lt;br /&gt;
BEGIN&lt;br /&gt;
   PAI the record&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;DTS updates are not displayed by the PAI output, since the transaction does not complete until the end of the procedure.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no COMMIT in the first request or if the file is not closed after the first request, then the date-time stamp field is not updated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the same User Language requests are executed as separate procedures, the date-time stamp field is updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
==&amp;lt;div id=&amp;quot;Suspending date-time stamp updates&amp;quot;&amp;gt;Suspending date-time stamp updates&amp;lt;/div&amp;gt;==&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways to suspend date=time stamp updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Suspending updates for all files on one thread&#039;s updates ===&lt;br /&gt;
&amp;lt;p&amp;gt;A user with system manager privileges can exclude date-time stamp files from DTS processing, suspending DTS updates for that user&#039;s thread. The user&#039;s thread does no date-time stamp processing on any file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To suspend DTS updates, reset the DTS parameter to 0. When DTS=0, the user can update any field, including the date-time stamp field, without automatically updating the date-time stamp field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To reset the DTS parameter, the user must have system manager privileges. The user must also have file manager privileges for any DTS-enabled files opened, either before or after DTS is reset to 0.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Automatic date-time stamp field updates are still performed for updates made to the files by other user threads with DTS set to 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Suspending all updates for a file===&lt;br /&gt;
&amp;lt;p&amp;gt;To disable all date-time stamp processing for a specific file, turn off the FOPT parameter X&#039;10&#039; bit on the command line or using the File Management Subsystem facility. Turning off this bit disables date-time stamp updates made by all users of that file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For more information on the DTS and FOPT parameters, see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=ZFIELD_image&amp;diff=59494</id>
		<title>ZFIELD image</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=ZFIELD_image&amp;diff=59494"/>
		<updated>2013-05-14T23:03:56Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; This image is required by the [[:Category:SOUL $functions#$FDEF function|$FDEF]] and [[:Category:SOUL $functions#$LSTFLD function|$LSTFLD function]]s, but also provides a complete list of all the available attributes for a Model 204 field.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ZFIELD image is provided as part of the Model 204 installation software.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; When using ZFIELD, be aware that $FDEF output maps to the location within the image (not the names) so do not change the order of the image items in ZFIELD.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Image Definition==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The ZFIELD image definition has undergone significant additions in Model 204 V7R5.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because all changes were additions, any code that you have from earlier version(s) will continue to work, but if you view the image details they are quite different.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;     [[ZFIELD Image detail up to V7R4]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;     [[ZFIELD Image detail V7R5 ]]&amp;lt;/p&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Where to find the image definition==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The location of ZFIELD for your site is listed in this table:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;IF your site runs under...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;THEN the ZFIELD image is stored in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/OS or z/VSE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The JCL library&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;On the 193 MAINT204 disk&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_X_(File_architecture)&amp;diff=59493</id>
		<title>Table X (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_X_(File_architecture)&amp;diff=59493"/>
		<updated>2013-05-14T23:01:59Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Avoidance of &amp;#039;Sick Record&amp;#039; Snaps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Stores all [[Record (File Architecture)|Record]] Extensions in a separate table from the the base records (so that [[Table B (File Architecture)|Table B]] contains only the base records).  &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Enabled by reorganizing / [[CREATE command: File|CREATE]]ing a file with [[XSIZE parameter|XSIZE]] greater than 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Available as of Model 204 V7.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
The [[Table B (File Architecture)|Table B]] of a Model 204 file has a maximum number of 16.7 million record numbers (IRNs for Internal Record Numbers). By default ([[XSIZE parameter|XSIZE]] = 0), these &#039;slots&#039; are used for both base records and extension records. &lt;br /&gt;
&lt;br /&gt;
By implementing Table X ([[XSIZE parameter|XSIZE]] &amp;gt; 0) all defined IRNs (up to 16.7 million) in Table B are used for base records only, allowing the storage of the maximum possible number of records in a file regardless of the number of extensions.&lt;br /&gt;
&lt;br /&gt;
Table X can be significantly larger than the 16.7 million limit of Table B; as the product of [[XSIZE parameter|XSIZE] * [[XRECPPG parameter|XRECPPG] may be up to 512 million extension slots. &lt;br /&gt;
&lt;br /&gt;
When the defined capacity of Table B or Table X is exceeded the file is marked full or the updating transaction is backed out.&lt;br /&gt;
&lt;br /&gt;
== Using Table X ==&lt;br /&gt;
&lt;br /&gt;
While similar in concept to [[Table B (File Architecture)|Table B]], the actual &#039;extension record number&#039; in Table X is far more straightforward.    &lt;br /&gt;
&lt;br /&gt;
* Because the number of slots in Table X is so large, and there is effectively no impact in wasting slots (until you approach that limit) [[XRECPPG parameter|XRECPPG]] can usually be set relatively high.  &lt;br /&gt;
&lt;br /&gt;
* Similarly, depending on how dynamic record growth is, you may wish to set [[XRESERVE parameter|XRESERVE]] higher than yopu would normally consider setting [[BRESERVE parameter|BRESERVE]]. This will enable records to grow without lengthening the extension chain.&lt;br /&gt;
&lt;br /&gt;
* Table X slots are always reusable. There is no special setting (equivalent to [[FILEORG parameter|FILEORG]] x&#039;04&#039;) necessary to enable the use of the reuse queue.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[RECRDOPT parameter]]==&lt;br /&gt;
&lt;br /&gt;
Table X may be implemented in one of two ways depending on the setting of the [[RECRDOPT parameter]].&lt;br /&gt;
&lt;br /&gt;
===The default setting of the [[RECRDOPT parameter|RECRDOPT]] (x&#039;00&#039;)===&lt;br /&gt;
&lt;br /&gt;
If the default setting of [[RECRDOPT parameter|RECRDOPT]] is used, while all extensions are stored in Table X, the record allocation in Table B is identical to what it is without Table X enabled.&lt;br /&gt;
&lt;br /&gt;
[[BRECPPG parameter|BRECPPG]] remains the &#039;&#039;&#039;maximum number&#039;&#039;&#039; of records which may occur on a page, and so IRNs may still be wasted (never assigned to a record) as data fills up a page. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setting [[RECRDOPT parameter|RECRDOPT]] to x&#039;01&#039;===&lt;br /&gt;
&lt;br /&gt;
This setting changes the base record allocation to ensure that all defined IRNs are available for use. &lt;br /&gt;
&lt;br /&gt;
For all x&#039;01&#039; [[RECRDOPT parameter|RECRDOPT]] files, a base record size limit (the read only parameter [[BRLIMSZ parameter|BRLIMSZ]]) is calculated:&lt;br /&gt;
&lt;br /&gt;
:For an entry order file:&lt;br /&gt;
::BRLIMSZ = (6140 / BRECPPG) - 2&lt;br /&gt;
: For an unordered file:&lt;br /&gt;
::BRLIMSZ = (6136 / BRECPPG) &amp;amp;#x2013; 2&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
When a new record is stored, rather than using any and all space available on a page, only up to [[BRLIMSZ parameter|BRLIMSZ]] bytes will be stored in Table B. This ensures that the full [[BSIZE parameter|BSIZE]] * [[BRECPPG parameter|BRECPPG]] number of IRNs can actually be stored in the file.  &lt;br /&gt;
&lt;br /&gt;
[[BRLIMSZ parameter|BRLIMSZ]] must be large enough to hold all preallocated fields.&lt;br /&gt;
&lt;br /&gt;
(Note that the [[BRESERVE parameter]] is ignored with x&#039;01&#039; [[RECRDOPT parameter|RECRDOPT]] files).&lt;br /&gt;
&lt;br /&gt;
==Advantages of Using Table X==&lt;br /&gt;
&lt;br /&gt;
===Scalability===&lt;br /&gt;
&lt;br /&gt;
The obvious advantage of implementing Table X relates to the ability to store the full 16.7 million base records in a Model 204 file, &lt;br /&gt;
&lt;br /&gt;
===Indexing Performance===&lt;br /&gt;
&lt;br /&gt;
Even if a file has significantly fewer records than the limit, you should consider the performance of your indices in deciding whether to utilize Table X, notably where you expect to have fields with non unique values. &lt;br /&gt;
&lt;br /&gt;
When Table X is enabled and [[RECRDOPT parameter|RECRDOPT]] = x&#039;01&#039;, the fact there are no wasted slots means that the bit maps containing the bitmap and list pages (and, of course, the [[#Table D (File Architecture)#Existence Bit Map|Existence Bit Map]]) are as compressed as possible.&lt;br /&gt;
&lt;br /&gt;
===Avoidance of &#039;Sick Record&#039; Snaps===&lt;br /&gt;
&lt;br /&gt;
When large sets of unlocked records (either via the use of [[Find Without Locks statement|Find Without Locks]] (FDWOL) or by referencing records on a Model 204 List) are processed it is very possible that the records will either have their contents changed, or even been deleted by the time the record is read. There are three problems which may be encountered when this happens:&lt;br /&gt;
&lt;br /&gt;
: the record should no longer be selected , its contents no longer matching the selection criteria&lt;br /&gt;
: the record has been deleted (and so &#039;Nonexistent record&#039;messages are produced)&lt;br /&gt;
: the record now (due to delete and update processing) contains an extension record.&lt;br /&gt;
&lt;br /&gt;
The last of these causes a &#039;Sick Record&#039; snap.&lt;br /&gt;
&lt;br /&gt;
While Rocket encourages the use of coding techniques to prevent all of these issues, File Managers can protect themselves from the snaps (at least) by enabling Table X in files where such processing is expected.&lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table X==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[BRLIMSZ parameter]]&lt;br /&gt;
|Calculated maximum size of base records &lt;br /&gt;
|-&lt;br /&gt;
|[[RECRDOPT parameter]]&lt;br /&gt;
|Controls the method by which base records are stored&lt;br /&gt;
|-&lt;br /&gt;
|[[XQLEN parameter]]&lt;br /&gt;
|The number of Table X pages in the reuse queue.&lt;br /&gt;
|-&lt;br /&gt;
|[[XRECPPG parameter]]&lt;br /&gt;
|The maximum number of extension slots on a Table X page.&lt;br /&gt;
|-&lt;br /&gt;
|[[XRESERVE parameter]]&lt;br /&gt;
|Table X reserve space per page&lt;br /&gt;
|-&lt;br /&gt;
|[[XREUSE parameter]]&lt;br /&gt;
|Free space required to reuse a table X page&lt;br /&gt;
|-&lt;br /&gt;
|[[XREUSED parameter]]&lt;br /&gt;
|The number of extension slots reused in table X&lt;br /&gt;
|-&lt;br /&gt;
|[[XSIZE parameter]]&lt;br /&gt;
|The number of pages in Table X.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
whose use is discussed in [[#File Size Calculation#Sizing Tables B and X|Sizing Tables B and X]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_D_(File_architecture)&amp;diff=59491</id>
		<title>Table D (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_D_(File_architecture)&amp;diff=59491"/>
		<updated>2013-05-14T22:44:42Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* The Existence Bit Map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a variety of structures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Record Lists and Bit Maps used for indexing&lt;br /&gt;
* The existence Bit Map (a special case of the above)&lt;br /&gt;
* The Ordered Index B-Tree&lt;br /&gt;
* The Record Map of preallocated fields&lt;br /&gt;
* The Procedures (if any)&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) List and Bit Map pages&amp;quot;&amp;gt;List and [[Bit Maps (File Architecture)|Bit Map]] Pages&amp;lt;/div&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The list and [[Bit Maps (File Architecture)|bit map]] pages in Table D are the pointers to sets of records with particular [[Field Value Pairs (File Architecture)|field value pairs]]. Whether you navigate to these pages via the B-Tree or Hash indices, these lists an bit maps exist when there are more than [[Table D (File Architecture)#Ordered Index spacing parameters|IMMEDiate]] records (B-Tree) or one (Hash index) such records in a segment.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== List Pages ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;List pages may contain lists for more than one field value pair.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The chart below the process that adds values to a List. The notable points are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When a list exceeds 30% of the usable page size (6144 bytes) it is converted to a bit map on a new page.&lt;br /&gt;
* When a page fills, the list being added to is moved to a new list page &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:List_to_Bit_Map_Transition_(File_Architecture).jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Bit Maps (File Architecture)|Bit Maps]] Used In Indexing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;While [[Bit Maps (File Architecture)|Bit Maps]] are used in Model 204 in a number of ways, one of the most critical is their use in rapid identification and further processing of sets of records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Whether using the hash or B-tree indices, a search returns some combination of direct pointers, lists, and bit maps.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the mixture, the Model 204 evaluation always processes the resultant set of records  as a bit map (ANDing and ORing bit maps being a strength of any IT system) and the result returned in the evaluation (associated with a label or list (see [[#PLACE RECORD and REMOVE RECORD statements|PLACE RECORD and REMOVE RECORD statements]] or [[AddRecordset (Recordset subroutine)|AddRecordset]]) also, internally is held as a bit map.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Existence Bit Map&amp;quot;&amp;gt;The Existence Bit Map&amp;lt;/div&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Existence Bit Map tracks which record numbers in Table B hold base records.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The execution of any [[Basic User Language Statements and Commands#FIND statement|FIND statement]] includes an implied &#039;and exists&#039; in its processing, and an unqualified find statement simply returns the existence bit map as its found set.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The existence bit map also supports the concept of logically deleted records, where the bit is turned off, but no space cleanup is done. See the [[Data Maintenance#DELETE ALL RECORDS statement|DELETE ALL RECORDS statement]] for further information on this technique.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Ordered Index&amp;quot;&amp;gt;Ordered Index&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
===B-Tree index structure===&lt;br /&gt;
&amp;lt;p&amp;gt;Fields defined with the ORDERED attribute are stored with their values in the Ordered Index, a B-Tree based index structure that maintains field values in an ordered sequence to facilitate range retrievals. A B-Tree is a tree structure residing in secondary storage (disk) whose elements of access and navigation are disk page size tables, or nodes (See [[#Ordered Index B-Tree diagram|Ordered Index B-Tree diagram]]). It provides a method of accessing record keys in order for a given file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is a single B-Tree structure in the file which contains all of the index entries for all of the ORDered fields in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Ordered Index processing===&lt;br /&gt;
&amp;lt;p&amp;gt;Records are first identified in the Ordered Index, then retrieved from the stored data records. The caller can retrieve keys and associated access information with an exact match specification or with a range specification. Only one Ordered Index exists per &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, containing all field-name-equals-value pairs (in sorted sequence) and record access information (pointers to Tables B or D) for all ORDERED fields defined to the file. For more information see [[Table D (File Architecture)#Understanding the Ordered Index|Understanding the Ordered Index]] (below).    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can use ORDERED fields in value loop processing. See the discussion [[#Introducing value loops|Introducing value loops]].&amp;lt;/p&amp;gt;&lt;br /&gt;
===Manipulating the Ordered Index===&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is created the first time an ORDERED field is defined and physically resides in Table D. Some of its characteristics can be modified through the REDEFINE command. If multiple deletions and updates reduce the page density and access efficiency, you can rebuild the Ordered Index using the REORGANIZE OI command (see [[ File Size Calculation#File Size Calculation|File Size Calculation]] ).   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Benefits of the ORDERED attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;Choosing the ORDERED attribute provides the following benefits:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Alphabetic, alphanumeric, and numeric range retrievals are typically resolved from the index and do not require a direct search of data records. The following examples show such range retrievals. An alphabetic range retrieval is followed by a numeric range retrieval:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NAME:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     NAME IS ALPHA LESS THAN SMITH&lt;br /&gt;
END FIND&lt;br /&gt;
&lt;br /&gt;
SAL: &lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     SALARY IS GREATER THAN 30000&lt;br /&gt;
END FIND    &lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Range searches through the index are supported for fields containing character strings as well as numeric values, for INVISIBLE fields, and for multiply occurring fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record-by-record processing in sequential order of a field value is simplified and made very efficient, because the Ordered Index maintains key values in order and highly clustered. Such processing is invoked by the User Language FOR EACH RECORD (FR) and FOR EACH VALUE (FRV) statements and by the Host Language Interface IFFDV, IFGET, and IFGETV functions.      &lt;br /&gt;
&amp;lt;p&amp;gt;IFGET supports ORDER SPECIFICATION only in a multicursor program. You can change your program to a multicursor program, if necessary.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Retrieval of record keys whose values match a given character pattern is optimized. This capability is called pattern matching, and is described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Understanding the Ordered Index===&lt;br /&gt;
====Types of nodes====&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index can have the following types of tree nodes, which are shown in the diagram below and described in the following table:    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Node type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Root&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Highest level node, which normally contains on one page all the pointers to the next level down-either an intermediate node or leaf node, if no intermediate nodes exist. Ordered Index searches begin at the root node.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Intermediate(s)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Level(s) below the root and above the leaf, which act as directory nodes and contain only pointers to leaf nodes or to lower intermediate nodes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Lowest level node, which contains a key field-name-equals-value pair, plus a record access pointer to each Table B record containing the pair, or to a Table D record list, or bit pattern that points to the Table B record. (Record lists and bit patterns are described in &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;.) A small Ordered Index tree can fit on a single node, in which case the root is also a leaf node. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In general, each node that has pointers to a lower level node has a large number of such pointers, which are referred to as a large fanout in searching down the tree.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Node Structure====&lt;br /&gt;
Each of the node pages contain: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Ordered Index tree node content&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Item&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Flag&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Indicates node type (root, intermediate, leaf)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Parent Node Pointer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Non-root node: pointer to parent node&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Root node&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;General information about the tree&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Node Version Number. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Used during FRV and FR IN ORDER retrievals.&amp;lt;br&amp;gt;&lt;br /&gt;
Determines if the revisited node is the same as the original&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Prior Sibling Node Pointer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to the left sibling node (at leaf level only)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Next Sibling Node Pointer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to the right sibling node (at leaf level only)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Offset Last Entry&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to free space on the page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Offset End of Page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;X’1800’ for 6184 byte page (only valid page size)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Prefix Key Pointer&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to the prefix key (longest key which &amp;lt;br&amp;gt;every record has in common)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entry Pointers&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointers to entries (data items) on the page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Ordered Index B-Tree diagram====&lt;br /&gt;
&amp;lt;p&amp;gt;This diagram represents a portion of a typical Ordered Index B-Tree, depicting the relationship of the tree nodes. The figure does not show leaf-node pointers to Table B records or to Table D record lists or bit patterns. It also does not represent the likely case in which the tree nodes contain a few hundred pointers per page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Logical Structure of Ordered Index B-Tree&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:File Architecture 2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Processing&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index B-Tree is processed as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When new Ordered Index entries are inserted in a full leaf node, a split of the node into two new nodes occurs, and an additional pointer is added to the node at the next higher level. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If this node is also full, it is split into two new nodes, and a new pointer is added to an intermediate node at the next higher level.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If this process reaches back to a full root node, the root is split into two intermediate nodes that are pointed to by a new root, one level higher. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This newly created level represents an increase by one of the tree&#039;s depth. Only root node splits increase the tree&#039;s depth. All leaf node entries are at the same depth. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An Ordered Index tree with a depth of three levels, with reasonable assumptions about entry sizes, can hold about 500 million entries. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; automatically maintains the tree structure. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;div id=&amp;quot;Ordered Index spacing parameters&amp;quot;&amp;gt;Ordered Index spacing parameters&amp;lt;/div&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Certain characteristics of the Ordered Index tree structure are controlled by the attributes set when the ORDERED field is [[DEFINE FIELD command|defined]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Ordered Index spacing parameters&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Parameter&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Default&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Range&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LRESERVE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0 - 99&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Percentage of left-hand leaf node space to leave free upon a node split during deferred update mode processing, including file loading or Ordered Index tree restructuring with the REORGANIZE OI command. Too low a setting can cause excessive splitting during subsequent minor modifications.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NRESERVE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0 - 99&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Percentage of left-hand intermediate node space to leave free upon a split during deferred update mode processing, including file loading or Ordered Index tree restructuring with the REORGANIZE OI command. Too low a setting can cause excessive splitting during subsequent minor modifications. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SPLITPCT&lt;br /&gt;
(or SPLT) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;50 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1 - 100 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Percentage of node data placed on the left-hand node when a split occurs during non-deferred User Language or Host Language Interface requests. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note: Unlike the two previous parameters, SPLITPCT specifies data to go on the left node, rather than space. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too high or too low a setting can cause excessive splitting. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Consider the characteristics of the data insetting this parameter. If, for example, you are indexing a processing date (or similar) it is likely that the data is always going to be increasing, and so a high SPLITPCT would be a good choice.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IMMED &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0 and 255 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of direct (immediate) pointers to Table B records per leaf page entry per segment in the Ordered Index tree. If the number of records to be pointed to in an entry is greater than the value of IMMED, all the record pointers are moved to a Table D list or bit map containing pointers to Table B. Storing information in Table D lists slows range retrieval but reduces Ordered Index tree depth. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Spacing parameter guidelines&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following guidelines, while not precise, might help you reduce the number of splits and increase update performance at your site. How these parameters function is closely dependent on the data and the application. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support strongly suggests that you try the default settings, as well as experiment with these parameter settings to see what works for your site.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because updates that cause page splits consume more resources than updates to less-than-full pages, set the spacing parameters to allow sufficient space for subsequent updating. Allowing too much space, however, might increase the B-Tree&#039;s depth and thereby impede performance. Knowing the likely updating characteristics of the ORDERED fields is the best guide for setting these parameters. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The settings of LRESERVE, NRESERVE, SPLITPCT, and IMMED are recommended settings only. The actual movement of data during an update might not conform exactly to the value of the appropriate parameter. The spacing parameters can be changed by specifying the parameter and a new value with the REDEFINE command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the default setting for SPLITPCT (50), unless the field is updated Online and most values are added in strict ascending or descending order, such as dates or employee ID numbers. If field values are added in:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ascending order, set SPLITPCT higher than 50.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Descending order, set SPLITPCT lower than 50.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you load records either via the File Load Utility (FLOD) or as deferred updates applied with the Z command, and the ordered field is heavily updated in Online mode, set LRESERVE and NRESERVE higher: up to 50. This causes more splits in the FLOD Z step (see &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;: &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;), but, by not packing the tree as tightly during the Z step, it should decrease the number of Online splits. Of these two parameters, LRESERVE is more important for tuning. If the field is not heavily updated Online, use the defaults for LRESERVE and NRESERVE. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is updated Online with information that is generally not in order, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support suggests that you experiment with the IMMED parameter. This parameter is less important if most updates are entered during the FLOD Z step. With the IMMED parameter, there might be a trade-off between Table D LIST I/O and B-Tree I/O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Record Map&amp;quot;&amp;gt;Record Map of Preallocated Fields&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Also in Table D (and no more than one page) is a map of the preallocated fields defined within the file. This is used when ever a new record is added to the file, as space is reserved for these fields just after the extension pointer at the beginning of the record.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DISPLAY RECORD command]] against the file shows the map. The fields appear in the map in the same order they are defined to the file, so, if you execute the following [[DEFINE FIELD command]]s: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
DEFINE FIELD PRE.FIELD.2 (OCC 1 LEN 9)     &lt;br /&gt;
DEFINE FIELD PRE.FIELD.1 (OCC 1 BIN)       &lt;br /&gt;
DEFINE FIELD PRE.FIELD.3 (OCC 1 LEN 20)    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DISPLAY RECORD command]] produces:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LENGTH OCCURS  PAD    NAME         &lt;br /&gt;
     9     1  X&#039;00&#039;   PRE.FIELD.2  &lt;br /&gt;
   BIN     1  X&#039;00&#039;   PRE.FIELD.1  &lt;br /&gt;
    20     1  X&#039;00&#039;   PRE.FIELD.3  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Procedures&amp;quot;&amp;gt;Procedures&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two parts to the storage of procedures in a Model 204 file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The actual procedure &#039;text&#039; (stored sets of commands and program statements run against Model 204 files) are stored, with procedures taking a minimum of 1 page, regardless of how small the procedure is.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And, so as not to have to scan the entire procedure store whenever you need to access one, a procedure dictionary. This dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Most sites keep their procedures in different files than their data, but, regardless, the files have identical structures whether they contain only procedures, only data, or both.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is defined using the [[PDSIZE parameter|PDSIZE]] and [[PDSTRPPG parameter]]s. &lt;br /&gt;
&lt;br /&gt;
===The Procedure Dictionary===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages (defined by the [[PDSIZE parameter]]). When Model 204 searches for a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, Model 204 searches the pages in the second block, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; When a new procedure is being stored, and Model 204 (as expected) does not find the name, it stores the new name in the first block in which it can find space. Model 204 allocates a new block of [[PDSIZE parameter]] pages when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Approaches to setting [[PDSIZE parameter|PDSIZE]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, Model 204 might allocate a new block when space still exists on the old block.&lt;br /&gt;
* Have a number of smaller blocks with fewer pages. Although it might take Model 204 longer to find the procedure name, there is less impact on Table D when a new block is allocated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software generally favors the first approach, particularly as the number of procedures you have grows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[[PDSTRPPG parameter]]====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;PPDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page.&amp;lt;/P&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is, of course, tied very tightly to the length of procedure names and alias. As such, knowledge of your installations naming standards is critical in setting this parameter (see [[File Size Calculation]] for details.&amp;lt;/p&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_D_(File_architecture)&amp;diff=59490</id>
		<title>Table D (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_D_(File_architecture)&amp;diff=59490"/>
		<updated>2013-05-14T22:42:32Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* List and Bit Map Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a variety of structures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Record Lists and Bit Maps used for indexing&lt;br /&gt;
* The existence Bit Map (a special case of the above)&lt;br /&gt;
* The Ordered Index B-Tree&lt;br /&gt;
* The Record Map of preallocated fields&lt;br /&gt;
* The Procedures (if any)&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) List and Bit Map pages&amp;quot;&amp;gt;List and [[Bit Maps (File Architecture)|Bit Map]] Pages&amp;lt;/div&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The list and [[Bit Maps (File Architecture)|bit map]] pages in Table D are the pointers to sets of records with particular [[Field Value Pairs (File Architecture)|field value pairs]]. Whether you navigate to these pages via the B-Tree or Hash indices, these lists an bit maps exist when there are more than [[Table D (File Architecture)#Ordered Index spacing parameters|IMMEDiate]] records (B-Tree) or one (Hash index) such records in a segment.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== List Pages ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;List pages may contain lists for more than one field value pair.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The chart below the process that adds values to a List. The notable points are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When a list exceeds 30% of the usable page size (6144 bytes) it is converted to a bit map on a new page.&lt;br /&gt;
* When a page fills, the list being added to is moved to a new list page &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:List_to_Bit_Map_Transition_(File_Architecture).jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== [[Bit Maps (File Architecture)|Bit Maps]] Used In Indexing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;While [[Bit Maps (File Architecture)|Bit Maps]] are used in Model 204 in a number of ways, one of the most critical is their use in rapid identification and further processing of sets of records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Whether using the hash or B-tree indices, a search returns some combination of direct pointers, lists, and bit maps.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the mixture, the Model 204 evaluation always processes the resultant set of records  as a bit map (ANDing and ORing bit maps being a strength of any IT system) and the result returned in the evaluation (associated with a label or list (see [[#PLACE RECORD and REMOVE RECORD statements|PLACE RECORD and REMOVE RECORD statements]] or [[AddRecordset (Recordset subroutine)|AddRecordset]]) also, internally is held as a bit map.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Existence Bit Map&amp;quot;&amp;gt;The Existence Bit Map&amp;lt;/div&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The Existence Bit Map tracks which record numbers in Table B hold base records.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The execution of any [[FIND statement]] includes an implied &#039;and exists&#039; in its processing, and an unqualified find statement simply returns the existence bit map as its found set.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The existence bit map also supports the concept of logically deleted records, where the bit is turned off, but no space cleanup is done. See the [[DELETE ALL RECORDS statement]] for further information on this technique.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Ordered Index&amp;quot;&amp;gt;Ordered Index&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
===B-Tree index structure===&lt;br /&gt;
&amp;lt;p&amp;gt;Fields defined with the ORDERED attribute are stored with their values in the Ordered Index, a B-Tree based index structure that maintains field values in an ordered sequence to facilitate range retrievals. A B-Tree is a tree structure residing in secondary storage (disk) whose elements of access and navigation are disk page size tables, or nodes (See [[#Ordered Index B-Tree diagram|Ordered Index B-Tree diagram]]). It provides a method of accessing record keys in order for a given file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is a single B-Tree structure in the file which contains all of the index entries for all of the ORDered fields in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Ordered Index processing===&lt;br /&gt;
&amp;lt;p&amp;gt;Records are first identified in the Ordered Index, then retrieved from the stored data records. The caller can retrieve keys and associated access information with an exact match specification or with a range specification. Only one Ordered Index exists per &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, containing all field-name-equals-value pairs (in sorted sequence) and record access information (pointers to Tables B or D) for all ORDERED fields defined to the file. For more information see [[Table D (File Architecture)#Understanding the Ordered Index|Understanding the Ordered Index]] (below).    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can use ORDERED fields in value loop processing. See the discussion [[#Introducing value loops|Introducing value loops]].&amp;lt;/p&amp;gt;&lt;br /&gt;
===Manipulating the Ordered Index===&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is created the first time an ORDERED field is defined and physically resides in Table D. Some of its characteristics can be modified through the REDEFINE command. If multiple deletions and updates reduce the page density and access efficiency, you can rebuild the Ordered Index using the REORGANIZE OI command (see [[ File Size Calculation#File Size Calculation|File Size Calculation]] ).   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Benefits of the ORDERED attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;Choosing the ORDERED attribute provides the following benefits:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Alphabetic, alphanumeric, and numeric range retrievals are typically resolved from the index and do not require a direct search of data records. The following examples show such range retrievals. An alphabetic range retrieval is followed by a numeric range retrieval:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NAME:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     NAME IS ALPHA LESS THAN SMITH&lt;br /&gt;
END FIND&lt;br /&gt;
&lt;br /&gt;
SAL: &lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     SALARY IS GREATER THAN 30000&lt;br /&gt;
END FIND    &lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Range searches through the index are supported for fields containing character strings as well as numeric values, for INVISIBLE fields, and for multiply occurring fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record-by-record processing in sequential order of a field value is simplified and made very efficient, because the Ordered Index maintains key values in order and highly clustered. Such processing is invoked by the User Language FOR EACH RECORD (FR) and FOR EACH VALUE (FRV) statements and by the Host Language Interface IFFDV, IFGET, and IFGETV functions.      &lt;br /&gt;
&amp;lt;p&amp;gt;IFGET supports ORDER SPECIFICATION only in a multicursor program. You can change your program to a multicursor program, if necessary.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Retrieval of record keys whose values match a given character pattern is optimized. This capability is called pattern matching, and is described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Understanding the Ordered Index===&lt;br /&gt;
====Types of nodes====&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index can have the following types of tree nodes, which are shown in the diagram below and described in the following table:    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Node type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Root&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Highest level node, which normally contains on one page all the pointers to the next level down-either an intermediate node or leaf node, if no intermediate nodes exist. Ordered Index searches begin at the root node.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Intermediate(s)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Level(s) below the root and above the leaf, which act as directory nodes and contain only pointers to leaf nodes or to lower intermediate nodes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Lowest level node, which contains a key field-name-equals-value pair, plus a record access pointer to each Table B record containing the pair, or to a Table D record list, or bit pattern that points to the Table B record. (Record lists and bit patterns are described in &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;.) A small Ordered Index tree can fit on a single node, in which case the root is also a leaf node. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In general, each node that has pointers to a lower level node has a large number of such pointers, which are referred to as a large fanout in searching down the tree.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Node Structure====&lt;br /&gt;
Each of the node pages contain: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Ordered Index tree node content&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Item&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Flag&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Indicates node type (root, intermediate, leaf)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Parent Node Pointer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Non-root node: pointer to parent node&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Root node&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;General information about the tree&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Node Version Number. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Used during FRV and FR IN ORDER retrievals.&amp;lt;br&amp;gt;&lt;br /&gt;
Determines if the revisited node is the same as the original&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Prior Sibling Node Pointer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to the left sibling node (at leaf level only)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Next Sibling Node Pointer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to the right sibling node (at leaf level only)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Offset Last Entry&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to free space on the page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Offset End of Page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;X’1800’ for 6184 byte page (only valid page size)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Prefix Key Pointer&lt;br /&gt;
&amp;lt;td&amp;gt;Pointer to the prefix key (longest key which &amp;lt;br&amp;gt;every record has in common)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entry Pointers&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Pointers to entries (data items) on the page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Ordered Index B-Tree diagram====&lt;br /&gt;
&amp;lt;p&amp;gt;This diagram represents a portion of a typical Ordered Index B-Tree, depicting the relationship of the tree nodes. The figure does not show leaf-node pointers to Table B records or to Table D record lists or bit patterns. It also does not represent the likely case in which the tree nodes contain a few hundred pointers per page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Logical Structure of Ordered Index B-Tree&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:File Architecture 2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Processing&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index B-Tree is processed as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When new Ordered Index entries are inserted in a full leaf node, a split of the node into two new nodes occurs, and an additional pointer is added to the node at the next higher level. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If this node is also full, it is split into two new nodes, and a new pointer is added to an intermediate node at the next higher level.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If this process reaches back to a full root node, the root is split into two intermediate nodes that are pointed to by a new root, one level higher. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This newly created level represents an increase by one of the tree&#039;s depth. Only root node splits increase the tree&#039;s depth. All leaf node entries are at the same depth. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An Ordered Index tree with a depth of three levels, with reasonable assumptions about entry sizes, can hold about 500 million entries. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; automatically maintains the tree structure. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;div id=&amp;quot;Ordered Index spacing parameters&amp;quot;&amp;gt;Ordered Index spacing parameters&amp;lt;/div&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Certain characteristics of the Ordered Index tree structure are controlled by the attributes set when the ORDERED field is [[DEFINE FIELD command|defined]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Ordered Index spacing parameters&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Parameter&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Default&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Range&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LRESERVE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0 - 99&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Percentage of left-hand leaf node space to leave free upon a node split during deferred update mode processing, including file loading or Ordered Index tree restructuring with the REORGANIZE OI command. Too low a setting can cause excessive splitting during subsequent minor modifications.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NRESERVE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0 - 99&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Percentage of left-hand intermediate node space to leave free upon a split during deferred update mode processing, including file loading or Ordered Index tree restructuring with the REORGANIZE OI command. Too low a setting can cause excessive splitting during subsequent minor modifications. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SPLITPCT&lt;br /&gt;
(or SPLT) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;50 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1 - 100 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Percentage of node data placed on the left-hand node when a split occurs during non-deferred User Language or Host Language Interface requests. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note: Unlike the two previous parameters, SPLITPCT specifies data to go on the left node, rather than space. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too high or too low a setting can cause excessive splitting. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Consider the characteristics of the data insetting this parameter. If, for example, you are indexing a processing date (or similar) it is likely that the data is always going to be increasing, and so a high SPLITPCT would be a good choice.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IMMED &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0 and 255 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of direct (immediate) pointers to Table B records per leaf page entry per segment in the Ordered Index tree. If the number of records to be pointed to in an entry is greater than the value of IMMED, all the record pointers are moved to a Table D list or bit map containing pointers to Table B. Storing information in Table D lists slows range retrieval but reduces Ordered Index tree depth. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Spacing parameter guidelines&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following guidelines, while not precise, might help you reduce the number of splits and increase update performance at your site. How these parameters function is closely dependent on the data and the application. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support strongly suggests that you try the default settings, as well as experiment with these parameter settings to see what works for your site.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Because updates that cause page splits consume more resources than updates to less-than-full pages, set the spacing parameters to allow sufficient space for subsequent updating. Allowing too much space, however, might increase the B-Tree&#039;s depth and thereby impede performance. Knowing the likely updating characteristics of the ORDERED fields is the best guide for setting these parameters. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The settings of LRESERVE, NRESERVE, SPLITPCT, and IMMED are recommended settings only. The actual movement of data during an update might not conform exactly to the value of the appropriate parameter. The spacing parameters can be changed by specifying the parameter and a new value with the REDEFINE command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the default setting for SPLITPCT (50), unless the field is updated Online and most values are added in strict ascending or descending order, such as dates or employee ID numbers. If field values are added in:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ascending order, set SPLITPCT higher than 50.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Descending order, set SPLITPCT lower than 50.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you load records either via the File Load Utility (FLOD) or as deferred updates applied with the Z command, and the ordered field is heavily updated in Online mode, set LRESERVE and NRESERVE higher: up to 50. This causes more splits in the FLOD Z step (see &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;: &amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;), but, by not packing the tree as tightly during the Z step, it should decrease the number of Online splits. Of these two parameters, LRESERVE is more important for tuning. If the field is not heavily updated Online, use the defaults for LRESERVE and NRESERVE. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is updated Online with information that is generally not in order, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support suggests that you experiment with the IMMED parameter. This parameter is less important if most updates are entered during the FLOD Z step. With the IMMED parameter, there might be a trade-off between Table D LIST I/O and B-Tree I/O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Record Map&amp;quot;&amp;gt;Record Map of Preallocated Fields&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Also in Table D (and no more than one page) is a map of the preallocated fields defined within the file. This is used when ever a new record is added to the file, as space is reserved for these fields just after the extension pointer at the beginning of the record.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DISPLAY RECORD command]] against the file shows the map. The fields appear in the map in the same order they are defined to the file, so, if you execute the following [[DEFINE FIELD command]]s: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
DEFINE FIELD PRE.FIELD.2 (OCC 1 LEN 9)     &lt;br /&gt;
DEFINE FIELD PRE.FIELD.1 (OCC 1 BIN)       &lt;br /&gt;
DEFINE FIELD PRE.FIELD.3 (OCC 1 LEN 20)    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[DISPLAY RECORD command]] produces:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LENGTH OCCURS  PAD    NAME         &lt;br /&gt;
     9     1  X&#039;00&#039;   PRE.FIELD.2  &lt;br /&gt;
   BIN     1  X&#039;00&#039;   PRE.FIELD.1  &lt;br /&gt;
    20     1  X&#039;00&#039;   PRE.FIELD.3  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table D (File Architecture) Procedures&amp;quot;&amp;gt;Procedures&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two parts to the storage of procedures in a Model 204 file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The actual procedure &#039;text&#039; (stored sets of commands and program statements run against Model 204 files) are stored, with procedures taking a minimum of 1 page, regardless of how small the procedure is.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And, so as not to have to scan the entire procedure store whenever you need to access one, a procedure dictionary. This dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Most sites keep their procedures in different files than their data, but, regardless, the files have identical structures whether they contain only procedures, only data, or both.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is defined using the [[PDSIZE parameter|PDSIZE]] and [[PDSTRPPG parameter]]s. &lt;br /&gt;
&lt;br /&gt;
===The Procedure Dictionary===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages (defined by the [[PDSIZE parameter]]). When Model 204 searches for a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, Model 204 searches the pages in the second block, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt; When a new procedure is being stored, and Model 204 (as expected) does not find the name, it stores the new name in the first block in which it can find space. Model 204 allocates a new block of [[PDSIZE parameter]] pages when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Approaches to setting [[PDSIZE parameter|PDSIZE]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, Model 204 might allocate a new block when space still exists on the old block.&lt;br /&gt;
* Have a number of smaller blocks with fewer pages. Although it might take Model 204 longer to find the procedure name, there is less impact on Table D when a new block is allocated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software generally favors the first approach, particularly as the number of procedures you have grows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====[[PDSTRPPG parameter]]====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;PPDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page.&amp;lt;/P&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is, of course, tied very tightly to the length of procedure names and alias. As such, knowledge of your installations naming standards is critical in setting this parameter (see [[File Size Calculation]] for details.&amp;lt;/p&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Obsolete_features&amp;diff=59489</id>
		<title>Obsolete features</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Obsolete_features&amp;diff=59489"/>
		<updated>2013-05-14T22:40:40Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Statement numbers===&lt;br /&gt;
&amp;lt;p&amp;gt;This appendix describes certain features of User Language which, while still supported, are generally considered obsolete. They have been superseded by other, more efficient features or techniques. Rocket Software does not recommend using these features in newly written requests and procedures.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software strongly recommends that you use statement labels (see [[Request Composition Rules#Statement labels|Statement labels]]) rather than statement numbers. Although statement numbers are still supported, this section is included primarily as documentation for applications developed using earlier releases of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
====FOPT parameter====&lt;br /&gt;
&amp;lt;p&amp;gt;The setting of the FOPT (File Options) parameter determines whether procedures within a file must be labeled or numbered. For more information on the FOPT parameter, refer to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference Manual.      &amp;lt;/p&amp;gt;&lt;br /&gt;
====Rules for using statement numbers====&lt;br /&gt;
&amp;lt;p&amp;gt;The rules for specifying statement numbers in User Language statements are summarized below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A statement number is made up of the digits 0-9 and an optional period (.). The number must begin with a digit and cannot contain blanks, although blanks preceding or following it are optional.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A statement number can start in any column up to but not including column INCCC.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any statement can be numbered, but some statements must be numbered. In particular, a statement must be numbered if:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It immediately follows a STORE RECORD or a FIND statement, in which case the statement number indicates the end of the preceding statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It is referred to by later statements. In most requests, COUNT RECORDS IN n, COUNT RECORD ON LIST m, NOTE, FIND, FOR EACH VALUE, and FOR EACH OCCURRENCE are referred to later and should therefore be numbered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It is the first statement after a loop, in which case a number is needed to indicate the end of the loop. An END statement following a loop does not require a number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;It is the statement following a THEN or ELSE clause which is to be executed if the condition is false.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The retrieval conditions of a FIND statement, the subexpressions of an IF statement, and the fields of a STORE RECORD statement must not be numbered, even if they start new lines. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A statement number can have any number of parts, which are delimited by periods. Thus, 2.3 and 0.1 are two part numbers, and 0.05.4 is a three part number. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A period (.) following a statement number is optional, but the periods separating the parts are required. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.1 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.1. &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;are both legal and are interpreted as the same number. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This rule also applies when referring to statements by number. Thus:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FOR EACH RECORD IN 1. &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FOR EACH RECORD IN 1 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;refer to the same statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any part of a statement number can be arbitrarily large. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of parts in a statement number must be the same as the level on which the statement is nested. For example, the following sequence is illegal because 2.1.1 has three parts but is nested at the second level:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. FOR EACH RECORD IN 1&lt;br /&gt;
   2.1.1 PRINT ALL INFORMATION&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a statement is not numbered, it is assigned a default level of nesting. The default level is the same as the level of the previous statement. If there is no previous statement, the default is the first level. If the previous statement starts a loop or a THEN, ELSE, or ELSEIF clause, or is a SUBROUTINE statement, the default level is one greater than the level of the previous statement.      &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any part of a statement number can have leading zeros. However, a number with leading zeros is not equivalent to one without. Thus 01 and 1 are both legal but not equivalent; the same is true of 1.1 and 1.01.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Statements need not be numbered in sequential order. The statement number is just a label for the statement; its numerical value has no significance. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following, for instance, is a legal request:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
3.    FIND ALL RECORDS FOR WHICH&lt;br /&gt;
      COMPANY = ROCKET&lt;br /&gt;
1.    FOR EACH RECORD IN 3.&lt;br /&gt;
      3.1 PRINT ALL INFORMATION&lt;br /&gt;
2.6. SKIP 1 LINE&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Within a request, statement numbers should be unique. If not, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; prints the message:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0223: STATEMENT LABEL MULTIPLY DEFINED &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This is a warning message; the request can still be run. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A statement number followed by a label is allowed with or without a space between the number and the label. If a statement number is followed by a label and there is no space between them, User Language separates them into statement number and label. Although a statement number can be followed by a label, it is strongly recommended that you avoid placing statement numbers and labels on the same line. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Examples&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following request addresses an automated library card catalogue. Each record in the file contains information that would normally appear on a single card in the catalogue, such as AUTHOR, TITLE, SUBJECT, and CATALOGUE NUMBER.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
 1. FIND ALL RECORDS FOR WHICH&lt;br /&gt;
       AUTHOR = PAULING&lt;br /&gt;
 2. FOR EACH RECORD IN 1&lt;br /&gt;
    2.1 NOTE SUBJECT&lt;br /&gt;
    2.2 FIND ALL RECORDS FOR WHICH&lt;br /&gt;
        SUBJECT = VALUE IN 2.1&lt;br /&gt;
    2.3 FOR EACH RECORD IN 2.2&lt;br /&gt;
        2.3.1 PRINT TITLE&lt;br /&gt;
 3. COUNT RECORDS IN 1&lt;br /&gt;
    PRINT COUNT IN 3&lt;br /&gt;
END &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following request uses a subroutine to validate full-screen input entries. A screen named DATA is defined with input areas named ITEM6, ITEM7, etc. Values entered during the READ SCREEN statement are validated one at a time by subroutine 900. Each screen item is assigned to the argument variable %A before the subroutine is called. If the item fails the validation, the subroutine sets %TAG to a nonzero value before returning. The request sets a tag on the screen for each incorrect item. The REREAD statement is issued if a screen item fails the validity tests.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
SCREEN DATA&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
END SCREEN&lt;br /&gt;
READ SCREEN DATA NO REREAD&lt;br /&gt;
      *VALIDATE DATA ITEMS&lt;br /&gt;
1.    %A = %DATA:ITEM6&lt;br /&gt;
      CALL 900&lt;br /&gt;
      IF %TAG THEN TAG %DATA:ITEM6&lt;br /&gt;
2.    %A = DATA:ITEM7&lt;br /&gt;
      CALL 900&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
50.   IF $CHKTAG(&#039;DATA&#039;) THEN&lt;br /&gt;
      REREAD SCREEN DATA&lt;br /&gt;
      JUMP TO 1&lt;br /&gt;
51.   *PROCESS DATA&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
      *SUBROUTINE TO PERFORM VALIDATION BY TABLE LOOKUP&lt;br /&gt;
      * IN:       %A       VALUE&lt;br /&gt;
      * OUT:      %TAG     NONZERO IF INVALID&lt;br /&gt;
900.  SUBROUTINE&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
         .&lt;br /&gt;
END    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===$DSCR function===&lt;br /&gt;
&amp;lt;p&amp;gt;The $DSCR function interprets its character string argument as a field name. It returns a variable-length character string describing the specified field. New application development should incorporate [[$FDEF#$FDEF|$FDEF]] that supplanted the $DSCR function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following discussion is provided to maintain existing code. Each letter in the returned string represents a particular field attribute. Attributes are listed in [[#$DSCR function|$DSCR function]].    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;$DSCR field attribute codes (file context)&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Character&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEFERRABLE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;I&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INVISIBLE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;L&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LEVEL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;M&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED NUMERIC&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;O&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OCCURS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE IN PLACE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;U&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;Undefined&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;How $DSCR works&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When $DSCR is invoked in file context, the returned string represents the description of the specified field in the current file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each letter that appears in the return value corresponds to an attribute in the field description. For example, if K is one of the letters in the returned string, then the field is KEY. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a particular letter does not appear in the result of a $DSCR call, then either the corresponding attribute does not apply or the attribute&#039;s opposite is in effect. For example, if M (many-valued) does not appear, the field is NON-CODED and NON-FRV, in which case M does not apply, or it is FEW-VALUED. You can resolve this by looking for C and F in the returned string.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When $DSCR is invoked in group context, the returned string represents a composite description of the field in all of the files of the current group. Some of the letters imply that the corresponding field attribute is present in all of the files in the group; others imply that the attribute is present in some (at least one) file in the group. If the field specified as the $DSCR argument is not defined in the current file or group, $DSCR returns the character string &amp;quot;U&amp;quot; (undefined). [[#$DSCR function|$DSCR function]] lists the individual letters and their meanings in group context. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;$DSCR field attribute codes (group context)&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Character&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CODED in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEFERRABLE in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;I&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INVISIBLE in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;L&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LEVEL in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;M&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED NUMERIC in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;O&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OCCURS in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE IN PLACE in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT in some&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE in all&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;U&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Undefined&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This request determines the attributes of a field and performs one of three types of searches, depending on the results of $DSCR.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
             %A = $READ (&#039;FIELD NAME&#039;)&lt;br /&gt;
             %B = $READ (&#039;FIELD VALUE&#039;)&lt;br /&gt;
             %C = $DSCR (%A)&lt;br /&gt;
             IF %C EQ &#039;U&#039; THEN&lt;br /&gt;
                PRINT &#039;ILLEGAL FIELD&#039;&lt;br /&gt;
                JUMP TO STOP&lt;br /&gt;
             END IF&lt;br /&gt;
             *CHECK FOR NON-KEY&lt;br /&gt;
             IF $INDEX (%C, &#039;K&#039;) EQ 0 THEN&lt;br /&gt;
                JUMP TO NUM.RNG.CHK&lt;br /&gt;
             END IF&lt;br /&gt;
             FIND AND PRINT COUNT&lt;br /&gt;
                %%A = %B&lt;br /&gt;
             END FIND&lt;br /&gt;
             JUMP TO STOP&lt;br /&gt;
&lt;br /&gt;
             *CHECK FOR NUMERIC RANGE&lt;br /&gt;
NUM.RNG.CHK: IF $INDEX (%C, &#039;R&#039;) EQ 0 THEN&lt;br /&gt;
                JUMP TO ALL.RECS&lt;br /&gt;
             END IF&lt;br /&gt;
             FIND AND PRINT COUNT&lt;br /&gt;
                %%A IS %B&lt;br /&gt;
             END FIND&lt;br /&gt;
             JUMP TO STOP&lt;br /&gt;
             *NEITHER KEY FOR NUMERIC RANGE&lt;br /&gt;
ALL.RECS:    FIND ALL RECORDS&lt;br /&gt;
             END FIND&lt;br /&gt;
             FOR EACH RECORD IN ALL.RECS&lt;br /&gt;
                IF %%A = %B THEN&lt;br /&gt;
                   PLACE RECORD ON LIST OK&lt;br /&gt;
                END IF&lt;br /&gt;
             END FOR&lt;br /&gt;
OKS:         COUNT RECORDS ON LIST OK&lt;br /&gt;
             PRINT COUNT IN OKS&lt;br /&gt;
STOP:        END&lt;br /&gt;
END   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SOUL]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_A_(File_architecture)&amp;diff=59488</id>
		<title>Table A (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_A_(File_architecture)&amp;diff=59488"/>
		<updated>2013-05-14T22:31:12Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Internal File Dictionary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Table A contains three structures:&lt;br /&gt;
&lt;br /&gt;
A dictionary of the fieldgroup / field names and their attributes.&lt;br /&gt;
&lt;br /&gt;
Some attributes (notably &#039;[[#Field Design (File Management)#CODED and NON-CODED attributes|CODED]]&#039;) require lists of values to be maintained. These lists are stored either in the [[#Field Design (File Management)#FEW-VALUED and MANY-VALUED attributes|FEW-VALUED or MANY-VALUED attribute]]s structures. &lt;br /&gt;
&lt;br /&gt;
Table A usually is small in relation to the rest of the file. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Internal File Dictionary&amp;quot;&amp;gt;&lt;br /&gt;
== &amp;lt;div id=&amp;quot;Table A (File Architecture) Internal File Dictionary&amp;quot;&amp;gt;Internal File Dictionary&amp;lt;/div&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Defined by the [[ATRPG parameter|ATRPG]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal file dictionary is a hashed file where each page contains up to [[ASTRPPG parameter|ASTRPPG]] field or field group definitions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each entry contains the field code (the representation of the field as physically used in records); the field name; and the attributes as assigned by the [[DEFINE FIELD command]] (or by a redefinition).&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To understand all the possible content of any entry, please refer to the [[ZFIELD image]] (the structure definition is provided with the Model 204 product). This image is populated by the [[Data Maintenance#$FDEF|$FDEF]] or [[Data Maintenance#$LSTFLD|$LSTFLD function]]s.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Non [[FILEORG parameter|FILEORG]] x&#039;100&#039; Files ===&lt;br /&gt;
&lt;br /&gt;
The maximum number of fields (the sum of [[ASTRPPG parameter|ASTRPPG]] * [[ATRPG parameter|ATRPG]]) in any Model 204 file is 4000. &lt;br /&gt;
&lt;br /&gt;
Even when the product of the above is 4000 or less, this number may not actually be reached because of wasted entries (where ASTRPPG is defined too large, you can not fit the full number on any page) or due to vagaries of the hashing algorithm.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enhanced Data Handling Files ([[FILEORG parameter|FILEORG]] x&#039;100&#039; Files) ===&lt;br /&gt;
&lt;br /&gt;
With the introduction of X&#039;100&#039;files (in Model 204 V7R5) the maximum number of fields ([[ASTRPPG parameter|ASTRPPG]] * [[ATRPG parameter|ATRPG]]) has been increased to 32000. In order to support this increase, as well as the additional attributes. the field code has been increased from 2 to three bytes.&lt;br /&gt;
&lt;br /&gt;
Where the maximum number of fields exceeds 4000, no fields may be defined as [[#Field Design (File Management)#KEY and NON-KEY Attribute|KEY]] or [[#Field Design (File Management)#NUMERIC RANGE and NON-RANGE attributes|NUMERIC RANGE]].&lt;br /&gt;
&lt;br /&gt;
== Many and Few Valued Pages ==&lt;br /&gt;
&lt;br /&gt;
If a field has the [[#Field Design (File Management)#CODED and NON-CODED attribute|CODED]] or [[#Field Design (File Management)#FOR EACH VALUE (FRV) and NON-FRV attibute|FRV]] attribute, a complete list of the values that the field has ever had (since it was last created or reorganized) is held in either FEW-VALUED or MANY-VALUED pages in Table A (with the latter the default).&lt;br /&gt;
&lt;br /&gt;
Both of these sets of pages should be kept very small. If large numbers of values exist, the File Manager should consider making the field Ordered.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table A==&lt;br /&gt;
&lt;br /&gt;
::{|&lt;br /&gt;
|[[ASIZE parameter]]&lt;br /&gt;
|A view only parameter containing the size of Table A&amp;lt;br&amp;gt; &lt;br /&gt;
the sum of ATRPG + FVFPG + MVFPG) &lt;br /&gt;
|-&lt;br /&gt;
|[[ASTRPPG parameter]]&lt;br /&gt;
|The maximum number of field / RFG definitions per page &lt;br /&gt;
|-&lt;br /&gt;
|[[ATRPG parameter]]&lt;br /&gt;
|The number of pages containing field / RFG definitions&lt;br /&gt;
|-&lt;br /&gt;
|[[FVFPG parameter]]&lt;br /&gt;
|The number of pages containing Few Valued Field values.&lt;br /&gt;
|-&lt;br /&gt;
|[[MVFPG parameter]]&lt;br /&gt;
|The number of pages containing Many Valued Field values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_group_(File_architecture)&amp;diff=59487</id>
		<title>Field group (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_group_(File_architecture)&amp;diff=59487"/>
		<updated>2013-05-14T22:29:02Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Data items do not normally exist on their own. If we take the case of addresses, for example, there are a series of fields that exist for each (house number, city, state , zip code) which clearly operate interdependently. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The idea of a Repeating Field Group (RFG) is to take these related fields and package them as a single entity so they can be read and updated with a single operation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Such packaging improves the readability and maintainability of Soul programs (see [[:Category:SOUL|Soul programming]] for the full detail of the statement changes) but also makes the Model 204 processing far more efficient.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Performance==&lt;br /&gt;
&amp;lt;p&amp;gt;Code accessing RFGs perform better in two main areas:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Improved record scan:===&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;In general, much of the time spent in Model 204 processing is due to the need to scan across the record, and the fact that the scan reads a field at a time and, if it is not the one that is need, goes on to the next, and so forth. As records grow in length, this scan, obviously, takes longer.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;With RFGs, the scan skips a group, rather than a field at a time, and so can find a specified data item faster.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, in reality, the improvement is better than this. If you are looking for a number of related (but non-RFG) fields, each field requires a separate scan to find it (insert rules mean that the data can not be presumed to be contiguous), so, if you are looking for 6 individual fields, the record must be scanned, once each.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If the related fields are packaged as an RFG, a single scan of the record will find all the fields; in addition, all of the related data items are in a single location.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Adds / inserts and deletes are a single operation:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Take the following blocks of code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
INSERT   ADDRESS_TYPE(%LOC)     = %ADDR:TYPE &lt;br /&gt;
INSERT   HOUSE_NUMBER(%LOC)     = %ADDR:NUM&lt;br /&gt;
INSERT   STREET(%LOC)           = %ADDR:STREET &lt;br /&gt;
INSERT   CITY(%LOC)             = %ADDR:CITY&lt;br /&gt;
INSERT   STATE(%LOC)            = %ADDR:STATE&lt;br /&gt;
INSERT   ZIP(%LOC)              = %ADDR:ZIP&lt;br /&gt;
&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;each of those statements are separate operations. For each one the correct position in the record must be found, and then the field inserted. This is repeated six times. &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;instead, with an RFG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INSERT FIELDGROUP ADDRESS(%LOC)&lt;br /&gt;
    ADDRESS_TYPE          = %ADDR:TYPE &lt;br /&gt;
    HOUSE_NUMBER          = %ADDR:NUM &lt;br /&gt;
    STREET                = %ADDR:STREET &lt;br /&gt;
    CITY                  = %ADDR:CITY&lt;br /&gt;
    STATE                 = %ADDR:STATE&lt;br /&gt;
    ZIP                   = %ADDR:ZIP&lt;br /&gt;
END INSERT&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This syntax does the entire insert as a single operation, so, only one insert position only needs to be found, and then the entire set of fields is inserted.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Field groups and Table B storage considerations==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;At first glance, the performance improvement comes at a cost of space (but this can usually be offset).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The costs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every record in a FILEORG=X&#039;100&#039; file contains the 4-byte highest allocated field group ID. Every occurrence of a field group has a unique binary ID that occupies from two to five bytes, thus supporting up to four gigabytes of field group IDs.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As is true of all FILEORG=X&#039;100&#039; files, the field name representation (as held in [[Table A (File Architecture)|Table A]] and thus in the record), are three bytes in length. Depending on the definitions of the fields within the group, this may be offset by the physical absence of fields defined as part of the group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Space saving and default and null values===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In fact, depending on the characteristics of the data you are storing, the use of RFGs may actually save space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Take as an example, a financial application where you are tracking a number of types of income over time. So you have an RFG containing a date and a number of income types: salary; interest; dividends; and so forth. It is likely that the majority of people for which you are keeping data have only a few of the many types of interest, so your record may have mostly zeros.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If so, by adding a [[#Field Design (File Management)#DEFAULT-VALUE (DV) attribute|default value]] of 0 and a [[#Field Design (File Management)#STORE-DEFAULT (SD) and STORE-NULL (SN) attributes|store default]] of NONE (the default for [[#Field Design (File Management)#AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes|exactly one]] fields in RFGs) none of the 0s would be physically stored (but would be treated as if they were).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For many files, the implementation of RFGs will improve both perfromance and space utilization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Field Group Identifiers==&lt;br /&gt;
&amp;lt;p&amp;gt;As mentioned above, every field group has unique ID.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This ID can be read with the [[$FIELDGROUPID function]] and is also displayed when a [[PRINT ALL INFORMATION statement|PRINT ALL INFORMATION]] is done.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;While, by itself, the ID is just for uniqueness, there is an interesting use for it, in that you can tell the order that things happened to a file, which is invaluable in debugging.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59486</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59486"/>
		<updated>2013-05-14T22:26:48Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Record Growth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique (but temporary... it will likely change when the file is reorganized) internal record number (IRN) that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Is just that: a way to describe all of the data held against the record key (presuming there is one)...&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The base record is the first (and, often, only) part of the record. It is assigned a slot in Table B, and its internal record number is how Model 204 identifies the record for indexing peuporses as well as in record sets and lists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a full record is not able to fit on a particular page (either, it itself may be more than 6140 bytes, or other records on the page do not leave sufficient space for the record) one or more extension records are stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table X (File Architecture)|Table X]] is enables, all such extensions are stored there, otherwise the extension(s) are stored in Table B.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Record Growth&amp;quot;&amp;gt;Record Growth&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[Data Maintenance#ADD statement|ADD statement]] (or the file load process) always places new data at the end of a record, and so, the record growth is straightforward: add a field at the end of the record, if it doesn&#039;t fit, start a new extension.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[Data Maintenance#INSERT statement|INSERT]]s are more complicated. Whether updating fields or repeating field groups, the correct location must be found within a record, and the data inserted at that point.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is, of course, quite possible, that there will not be enough space on the page to insert it, in which case space is made by moving data from this record (after the insert point) down the extension chain. So, with large extension records, it is conceivable that a single field added to the base record (for example) might cause all of the extensions to need to change.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[|Field Design (File Management)#Preallocated fields|OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Field Design (File Management)#Preallocated Fields|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All records stored in a Model204 file will contain all of the preallocated fields (if any) for that file. These are stored based on the [[Table D (File Architecture)#Record Map of Preallocated Fields|Record Map of preallocated fields]] stored in Table D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Group (File Architecture)|Repeating Field Groups]] (RFGs)====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Permits sets of data to be managed together. Inside of the RFG is a series of field value pairs (as above) but these fields are not independent of each other.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways that large objects (data longer than 255 bytes) may be handled in a Model 204 record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [[Table E (File Architecture)|Native Large Objects in Table E]] =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Large objects stored as part of a record, contain a pointer locally (within the record) to the starting point of the Large Object in Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Starting in Model 204 V7R5, the handling and functionality of Large Objects can (by using the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit) be done rather differently. See [[Table E (File Architecture)|Table E]] for the full discussion.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The application would need to parse the input data into 255 byte chunks to store it, and then again, string it together to read it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, where large objects need to be stored that, for efficiency reasons, Tabel E be enables.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Adding_records_(File_architecture)&amp;diff=59485</id>
		<title>Adding records (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Adding_records_(File_architecture)&amp;diff=59485"/>
		<updated>2013-05-14T22:24:43Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Adding a record to a file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Adding a record to a file==&lt;br /&gt;
&amp;lt;p&amp;gt;This section describes the process to add a record to a Model 204 file. It presumes that the fikle has already been [[CREATE command: File|CREATE]]d and [[INITIALIZE command|INITIALIZE]]d, and that all fields and Repeating Field Groups (RFGs) needed in this action are defined to the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And a reminder: while fields and RFGs may, generally, be added to the file at any time, some field attributes (for example, the pre-allocation of fields with the OCCURS attribute), may only be added in a file to which no data has yet been added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The addition of the record is driven by the User Language [[Data Maintenance#STORE RECORD statement|STORE RECORD statement]] with an (optional) list of &#039;&#039;fieldname&#039;&#039; value pairs, as in the following example. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STREC: STORE RECORD&lt;br /&gt;
  NAME=RASPUTIN&lt;br /&gt;
  SEX=MALE&lt;br /&gt;
  OCCUPATION=MONK&lt;br /&gt;
 END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Alternatively, you can use the Host Language Interface IFBREC, IFPUT, and IFSTORE functions, which also require a list of name = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All referenced field names must previously have been defined, but not all field names need to have assigned values in every record. In fact, if you omit a field, the field is not stored in the record at all, thus saving space in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For more information see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual or the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Host Language Interface Reference Manual.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How Model 204 adds records to a file==&lt;br /&gt;
&amp;lt;p&amp;gt;The process of adding a new record to a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
#Like all User Language code, the process consists of two parts; first the code is compiled: &lt;br /&gt;
##all field names, the values of coded fields and some FRV fields are converted into fixed-length codes from Table A&lt;br /&gt;
##all other attributes of the referenced fields are noted for use during the execution&lt;br /&gt;
#Presuming the code compiles, in the evaluation process, when the STORE RECORD statement is executed: &lt;br /&gt;
##a physical internal record number (IRN) is assigned in Table B taking the [[BRESERVE parameter]] into account&lt;br /&gt;
##if there are any preallocated fields, the fields in the [[#Table D (File Architecture) Record Map|record map]] are added to the record&lt;br /&gt;
##then, for each field value pair in the STORE RECORD statement (none are required, an &#039;empty&#039; record can be created if no fields are referenced): &lt;br /&gt;
###the field value pair is added to the record (or preallocated field updated)&lt;br /&gt;
###of course, normal extension record rules apply (as discussed in [[Table B (File Architecture)|Table B]])&lt;br /&gt;
###if the field is indexed, the necessary updates occur to Tables C and D.&lt;br /&gt;
&lt;br /&gt;
==Considerations when adding many records to a file==&lt;br /&gt;
&amp;lt;p&amp;gt;If you are adding a large number of records to a file, consider these alternatives for increased efficiency: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Deferred updates. Defer changes or additions that update Tables C and D, instead specifying that step 3 above be performed in separate phases. [[ Deferred Update Feature#Deferred Update Feature|Deferred Update Feature]] describes how to use deferred updates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File Load utility. If the raw data for the records to be stored in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file already exists in a machine-readable format (magnetic tape, direct-access storage, cards), use the File Load utility to load that data directly into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file quickly and economically. [[ File Load Utility#File Load Utility|File Load Utility]] describes the File Load utility.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_design&amp;diff=59472</id>
		<title>Record design</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_design&amp;diff=59472"/>
		<updated>2013-05-13T00:19:36Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because of the unique nature of Model 204 Records (see [[Record (File Architecture)|Record architecture]]), the translation of a logical design into Model 204 records often includes a great deal of logically related data being included in a single physical record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you consider a billing system, where you might consider having separate records for an invoice, and then additional records for each of the invoice lines, for a Model 204 perspective it is more likely that you would have a single record where the invoice lines simply repeat (either as a set of individually managed fields, or as a formal [[Repeating Field Group (File Architecture)|Repeating Field Group]] (RFG).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are a number of reasons why this approach suits Model 204:&amp;lt;/p&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Because a single read of the record makes all of the information available (think of the data as being pre-joined) performance should be better&lt;br /&gt;
* the factors usually causing the records to be defined piecemeal, notably having issues with variably occurring data, do not exist in Model 204.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;The most important thing, regardless of whether you are implementing a design in Model 204 or any platform, is to understand the data relationships.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The importance of a good logical design==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you have a good logical design, the record structure should almost jump out at the file manager: tying data which is logically connected can be efficiently, physically, tied together.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Perhaps this should be thought of in reverse: if you do not have a good logical design, it is unlikely that you will be able to implement a system which performs well and achieves its objectives.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A unique record key?==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike many systems, Model 204 will support records without a unique record key.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, while it supports it, it is often not a good idea. Perhaps you need to provide reports off of the data, or extract data to feed other systems. You are likely to find that such downstream processes &#039;&#039;&#039;will&#039;&#039;&#039; require uniqueness.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Consider, in such cases, of using an [[Field Design (File Management)|automatic field]] such as the CREATE-TIME to make sure that all records contain a unique key.&amp;lt;/p&amp;gt; &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59471</id>
		<title>Table B (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59471"/>
		<updated>2013-05-13T00:08:19Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This topic covers the internal architecture of a Model 204 Table B page. &lt;br /&gt;
&lt;br /&gt;
For a discussion of the ways a File Manager may organize these pages in a file, please refer to [[File Design (File Management)]]. &lt;br /&gt;
&lt;br /&gt;
At a minimum, Table B contains all of the base records in a Model 204 file. If [[Table X (File Architecture)|Table X]] is not enabled it also contains all extension records. If [[Table E (File Architecture)|Table E]] is not enabled, then any data whose contents is greater than 255 bytes must be held as a series of repeating fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The structure of a Table B page ==&lt;br /&gt;
&lt;br /&gt;
::[[File:Table B Basic Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
Not shown is a 4 byte &#039;Reuse Queue Page Number&#039; for Unordered Files. If it is present, it is in the lower left hand corner (&#039;before&#039; (working backwards) the first record on the page). &lt;br /&gt;
&lt;br /&gt;
Each of the items in the chart are described, below:&lt;br /&gt;
&lt;br /&gt;
=== Pointers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Free Space Pointer&#039;&#039;&#039; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The free space pointer contains the location of the first byte of free space on the page (as shown in the diagram, where the last record on the page ends). On pages with no records yet stored, it points to the last byte on the page (either the very end, of just before the Reuse Queue Page Number described above).&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Record Pointer Array&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are &#039;&#039;up to&#039;&#039; [[BRECPPG parameter|BRECPPG]] record pointers. These are not physically put onto the page until the record is being added to the file.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;Up to&#039;&#039; because, (except as noted below) it is possible that, as large records are stored, there will not be room for the full number of BRECPPG on the page, and so they would not be stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Enhanced Data Handling ([[FILEORG parameter|FILEORG]] x&#039;100&#039;) files, with [[RECRDOPT parameter|RECRDOPT]] set to x&#039;01&#039;, you will always have space for the full number of BRECPPG record pointers, as their length is included in the calculation of the [[BRLIMSZ parameter]]. They still are not present on the page until the record is stored.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Internal Record Number&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The record pointer is a useful identifier of a record, and is referred to as the &#039;Internal Record Number&#039; (IRN).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If, for example, [[BRECPPG parameter|BRECPPG]] is set to 10, the first Table B page will, at most) contain records 0 to 9 (the first record in a Model 204 file is IRN 0); the second page contains IRNs 10 to 19, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Eben if all the record slots are not used, they are treated as if they were, meaning that, in the exmple above, the second page in the file will still contain IRNs 10 to 19 even if only one record is physically present on the first page.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[$CURREC]] for a handy way to retrieve the IRN.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that the IRN is not a permanent record identifier. If the file is reorganized it is highly likely that almost all records will have a different IRN afterward.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Space Management ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Table B page grows from the top down (the pointers) and the bottom up (data area) simultaneously.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When [[Adding Records (File Architecture)|adding records]], there must be enough room to add all the preallocated fields on that page. Also, no new record will be added to the page if there are less than BRESERVE parameter|BRESERVE bytes available on the page. In each of these cases, the &#039;next&#039; page is used (see [[Adding Records (File Architecture)|adding records]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Similarly, when adding fields to existing records, when it reaches a point where the new field (or fieldgroup) will not fit on the current page. When that happens, data is moved from the record into the extension record next in the chain, with, perhaps, a new extension being created at the end of the chain.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Further information on Records ===&lt;br /&gt;
&lt;br /&gt;
Refer to [[Record (File Architecture)|Records]] and [[Adding Records (File Architecture)|Adding Records]] for a full discussion of record architecture.&lt;br /&gt;
&lt;br /&gt;
Refer also to [[Record Design (File management)|Record design]] for the best use of Model 204 Records.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) Segments&amp;quot;&amp;gt;Table B Segments&amp;lt;/div&amp;gt; ===  &lt;br /&gt;
&lt;br /&gt;
==== Definition ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used in a number of ways in Model 204&#039;s processing. As bit maps can contain bits covering 49152 records (usable space of 6144 * 8) records, this number of records is called a segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Importance of and Use ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to indexing (discussed below), segments are used, when a procedure is compiled, to track the maximum number of Table B segments that the code needs to be able to handle (remember that sets of records are tracked via bit maps). &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[INCREASE command]] boundaries ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When Model 204 code is compiled, one of the critical things notes is the number of segments in the file. This is necessary so that space can be reserved for found sets and other record tracking methodology.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because of this, if you want to increase Table B, you can only do so to the next segment boundary (i.e.: the next multiple of 49152).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For flexibility, Rocket Software recommends that you consider the use of the [[MAXINCBP parameter]]. This parameter (expressed as a percentage) is the additional number of segements reserved in compilation for growth.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Managing File and Table Sizes#The MAXINCBP parameter|the MAXINCBP parameter]] for a full explanation of how it works.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Use in Indexing ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The segment concept is inherent to Model 204 indexing in a number of ways. Specifically:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See [[#Table C (File Architecture)#Segment Entries |Table C Segment Entries]] for the effect of segments in the hash index.&lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#B-Tree index structure|B-Tree index structure]] for the effect of segments in the ordered index.  &lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#Bit Maps Used In Indexing|bit maps used in indexing]] for how segments relate to the detailed level of both types of indexes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) The Reuse Queue&amp;quot;&amp;gt;The Reuse Queue&amp;lt;/div&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Reuse Record Number (RRN) files ([[FILEORG parameter|FILEORG]] x&#039;04&#039; bit set) pages with sufficient space (see the [[BREUSE parameter]]) and one or more available record slots are kept in a reuse queue.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This may happen due to records (or large numbers of fields) are deleted.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These use the 4 byte reuse queue page number to track the pages&#039;s availability.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;RRN files add records to the pages from the queue before adding records to [[BHIGHPG parameter|BHIGHPG]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table B==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This table excludes the parameters used for [[Hash Key Files|Hash Key]] and [[Sorted Files]]. Please see those topics for a full discussion of their special parameters (and distinction in meanings for some of these).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also not shown are the parameters which control the [[#Resizing Tables (File Management) Automatic Increases|automatic increase]] in table size, which see.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
::{|&lt;br /&gt;
|[[BHIGHPG parameter]]&lt;br /&gt;
|Table B highest active page. Normally the high water mark of pages &amp;lt;br&amp;gt;used (except for Hash Key and Sorted files). Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BQLEN parameter]]&lt;br /&gt;
|The number of pages in the reuse queue. Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRECPPG parameter]]&lt;br /&gt;
|The maximum number of record slots on a Table B page. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRESERVE parameter]]&lt;br /&gt;
|Table B Reserved space. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSE parameter]]&lt;br /&gt;
|The minimum amount of space necessary to add a page to the reuse queue. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSED parameter]]&lt;br /&gt;
|The numberof record slots reused. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRLIMSZ parameter]]&lt;br /&gt;
|Base record size maximum. Viewable only.   &lt;br /&gt;
|-&lt;br /&gt;
|[[BSIZE parameter]]&lt;br /&gt;
|The number of pages in Table B. &lt;br /&gt;
|-&lt;br /&gt;
|[[RECRDOPT parameter]]&lt;br /&gt;
|Record storage options. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_reorganization_and_table_compaction&amp;diff=59470</id>
		<title>File reorganization and table compaction</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_reorganization_and_table_compaction&amp;diff=59470"/>
		<updated>2013-05-12T23:03:14Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Dynamic data compactor for Table E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;In the life of a database, certain conditions can arise that make reorganizing a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file either necessary or desirable. This chapter summarizes the criteria that normally make reorganization worthwhile and the techniques to accomplish the reorganization.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;But not every situation requires a reorganization.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;Changes in data structures often can be handled by simply adding, deleting, or changing fields in a file, and you can thus avoid a complete file reorganization. Refer to the discussion of the DEFINE, REDEFINE, RENAME, and DELETE commands in [[ Defining Fields Manually#Defining Fields Manually|Defining Fields Manually]] for information about manipulating fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Resizing of Tables B, D E and X can often be done as discussed in [[Resizing Tables (File Management)|Resizing Tables]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Beyond this, the available tools are:&lt;br /&gt;
&lt;br /&gt;
=== Reorganization and Compaction Tools === &lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;File Reorganization Tools&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tool&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For more information, see ...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fast/Unload and Fast/Reload&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Products available to speedily reorganize even the largest Model 204 files. In addition, some of the limitations in other reorganization methods (invisible fields, procedures and Large Objects for example) are handled seamlessly&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These describe the products in detail:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[http://www.sirius-software.com/maint/download/funr.pdf Fast/Unload]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[http://www.sirius-software.com/maint/download/frelr.pdf Fast/Reload]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed or variable unload and reload&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Requires the data to be unloaded into a structure and then reloaded&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[#Techniques for reorganization|Techniques]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[REORGANIZE command|REORGANIZE OI]]:Reorganizing just the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Improve the file&#039;s performance by cleansing the ordered index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[#Reorganizing the Ordered Index|Reorganizing the Ordered Index]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[COMPACTB command|Compact]]ing Tables B and X&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Combines extension records to improve performance. Optionally cleans up logically deleted records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[#Dynamic data compactor for Table B|Dynamic data compactor for Table B]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[COMPACTE command|Compact]]ing Table E&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;For files without the [[Table E non x&#039;100&#039; (File Architecture)|FILEORG x&#039;100&#039;bit]] set, defragments TABLEE to create larger contiguous areas of free pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[[#Dynamic data compactor for Table E|Dynamic data compactor for Table E]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Reorganizing Dictionary/204 files====&lt;br /&gt;
&amp;lt;p&amp;gt;For information about reorganizing &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 files see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
====CCA system files must not be reorganized====&lt;br /&gt;
&amp;lt;p&amp;gt;With the exception of CCASYS (which internally is a standard Model 204 file), never reorganize or otherwise modify CCA proprietary (identified by their &#039;CCA&#039; prefix)  files or procedures unless specifically instructed to do so by Technical Support.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Criteria for reorganization==&lt;br /&gt;
&amp;lt;p&amp;gt;A number of different conditions call for file reorganization including:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Expanding the size of Table A and Table C for a file before the tables become full &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Improving &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; performance by:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;::rebuilding the indices&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;::moving records around so that records read together are likely on the same page&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;::resetting file parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;::resucing extension chains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Recovering space that has been rendered unusable&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To a very large extent, deciding on which (and when) files to reorganize are dependent upon how the files are updated: how often records are added and deleted; and how often data is added to (or deleted from) records. Or, changes are required which involve parameters that cannot be adjusted dynamically. Some of these conditions are described in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Avoiding table full conditions===&lt;br /&gt;
&amp;lt;p&amp;gt;Normally, file growth most directly affects Table B, D, E and X, all of which can be modified dynamically with the [[INCREASE command]] without necessitating a reorganization; see [[Resizing Tables (File Management)]]. However, Table A and Table C cannot be adjusted dynamically. New distinct KEY field values that previously have not occurred in the file require, and data growth which start new segments in Table B, both will cause additional entries in Table C. New field definitions, FRV and/or CODED field values require Table A space. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional requirements can often be anticipated and included in the Table A and Table C allocations (or, you can convert any KEY fields to ORDered to avoid Table C issues entirely). Table A usually is very small relative to the entire file, and Table C often is considerably smaller than either Tables B, D, E or X. But, in other situations, these tables might need to be expanded during file reorganization. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Monitoring Table A and Table C&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To avoid filling Table A or Table C, regularly monitor table page retries (ARETRIES and CRETRIES, respectively)-more often in highly volatile databases. If the number of page retries shows a noticeable increase from one run to another, the file might be approaching a table full condition and might require reorganization. The TABLEC command monitors the use of Table C.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Monitoring Hash Key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The special &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file organization that uses hashed access to Table B (see [[ Hash Key Files#Hash Key Files|Hash Key Files]]) does not allow dynamic expansion of Table B. Monitoring the SPILLADD, the number of spills, and BHIGHPG, the number of full pages, parameters helps to anticipate the need to reorganize hashed files.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Improving performance: Data===&lt;br /&gt;
&amp;lt;p&amp;gt;When a file is created, certain file parameters are set, which affect the utilization of the tables. Some of these parameters cannot be reset and the file might need to be reorganized to reflect changes in file characteristics. If the file is not reorganized when file characteristics change, system performance might be affected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Avoiding extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if new fields are added to records in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might create extension records. If the number of extension records increases (check the EXTNADD parameter), consider reorganizing the file to turn [[Table X (File Architecture)|Table X]] on or adjust parameters such as [[BRECPPG parameter|BRECPPG]] and [[BRESERVE parameter|BRESERVE]]. Use the [[TABLEB command]] (or its [[TABLEBX command|TABLEBX]] variation) to determine which parameters need adjusting.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Increasing the amount of reserve space per page (BRESERVE) without reorganizing the file affects only new Table B pages.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Combining extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Another way to reduce extension records and improve performance without a file reorganization is to run the data compactor, described in [[#Dynamic data compactor for Table B|Dynamic data compactor for Table B]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Aggressive use of the [[COMPACTB command]] should mean that you rarely need to reorganize a file due to extension records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reducing the number of extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Reorganizing a file will result in the lowest possible number of extension records (based on your parameter settings) as possible. For files which do not have Table X enabled, often you would adjust the [[BRECPPG parameter]] to decrease the number of extensions. Care must be taken that you do not decrease it too far as this can cause space wastage on pages that are mostly extensions and cause an increase of Table B usage. By enabling Table X, extension record management is far more straight forward./p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing sorted files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sorted files also might need to be reorganized. File parameters, such as BPGPMSTR, BPGPOVFL, and BEXTOVFL, might not reflect current requirements. The result is added overflow records or spill between overflow areas. A discernible increase in OVLFADD or SPILLADD might indicate that a sorted file needs to be reorganized. In the extreme case, if you do not reorganize the file, new records cannot be stored.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Improving performance: Indexing===&lt;br /&gt;
&amp;lt;p&amp;gt;The Model 204 file indexes all tie to the internal record number (IRN) of the record. If you have a file which has a high volume of additions and deletions, over time both the hash key index (Table C) and the B-Tree (in Table D) will grow. In both cases, a full reorganization of the file will rebuild the indexes and improve performance. See also [[#Reorganizing the Ordered Index|Reorganizing the Ordered Index]] for a way to rebuild the B-Tree.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Recovering unusable space===&lt;br /&gt;
&amp;lt;p&amp;gt;In an entry order file, deleted space in Table B is reused only for the expansion of existing records on that page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Avoiding unusable space problems&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Highly volatile files might require reorganization to recover the record numbers from deleted records. Such files use space more efficiently if they are unordered with the reuse record number option.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Techniques for reorganization==&lt;br /&gt;
&amp;lt;p&amp;gt;To reorganize a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, copy the records from Table B and the procedures from Table D onto sequential data sets and reload from those data sets. This section discusses techniques for copying records and procedures onto sequential data sets, and how to rebuild the access control table (ACT).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To reorganize a file, follow these steps:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the records from Table B into one or more sequential data sets. (See [[#Copying records|Copying records]].)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Copy the procedures into a sequential data set. (See [[#Copying procedures|Copying procedures]] and [[#Reloading a small number of procedures|Reloading a small number of procedures]].)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-create and initialize the file, making the desired changes to space allocation, file parameters, and field definitions. If no space parameter changes are needed, initialize the file and define the fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reload the file from the sequential data sets in step 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-enter the SECURE commands needed to rebuild the Access Control Table (ACT).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Re-create the procedures from the sequential data set in step 2. (See [[#Reloading a small number of procedures|Reloading a small number of procedures]].)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You cannot use the file backup utility (DUMP and RESTORE) described in [[ File Dumping and Restoring#File Dumping and Restoring|File Dumping and Restoring]] to reorganize files. However, you can use RESTORE with the 128 option to defragment Table B and D space that was added with the INCREASE command.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Copying records===&lt;br /&gt;
&amp;lt;p&amp;gt;If the file was updated after its creation, you must retrieve all the records in Table B and copy their fields into a sequential data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the file was originally created from a sequential data set and not subsequently updated, you can rerun the file load with the same data set. This is, however, an unlikely circumstance, because static files rarely need reorganizing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;INVISIBLE fields are handled differently; see the description of recreating INVISIBLE fields on [[#Reorganizing INVISIBLE fields|Reorganizing INVISIBLE fields]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Copying and reloading examples===&lt;br /&gt;
&amp;lt;p&amp;gt;The following examples demonstrate User Language techniques for copying and reloading records in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. These techniques use User Language, the directed output feature (USE command) and the File Load utility. The Host Language Interface can replace the User Language portions, if desired, although User Language is usually more efficient. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Copying into a fixed-format file===&lt;br /&gt;
&amp;lt;p&amp;gt;The most efficient method for reorganizing most files is to create a fixed-format sequential file and a corresponding file load program based on that format.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, assume that you have a PEOPLE file that contains records consisting of three fields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Field Name    Maximum Length    Field Type&lt;br /&gt;
&lt;br /&gt;
NAME          20                KEY&lt;br /&gt;
AGE            3                KEY,NR&lt;br /&gt;
SEX              6                KEY,COD,FV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS request produces a sequential data set named COPY in which each fixed-length record contains the NAME, AGE, and SEX fields from one record in the PEOPLE file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set the UDDLPP parameter to zero before running the request to suppress page headers. Set UDDCCC to zero or to at least one greater than the output record length. You might also need to reset the length of the LOBUFF parameter in the PARM field of the EXEC statement.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Copying files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For step 1 of [[#Techniques for reorganization|Techniques for reorganization]], run these commands and this User Language request:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;OPEN PEOPLE&lt;br /&gt;
RESET UDDLPP = 0,UDDCCC = 0&lt;br /&gt;
USE OUTTAPE&lt;br /&gt;
&amp;lt;/var&amp;gt;BEGIN&lt;br /&gt;
   ALL: FIND ALL RECORDS&lt;br /&gt;
        END FIND&lt;br /&gt;
   PRINT.LOOP: FOR EACH RECORD IN ALL&lt;br /&gt;
               PRINT NAME WITH AGE AT COLUMN 21 -&lt;br /&gt;
                 WITH SEX AT COLUMN 24&lt;br /&gt;
               END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DCB and FILEDEF information&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OUTTAPE is the name of the following DD statement in the JCL of the batch or Online job in z/OS:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//OUTTAPE  DD  DSN=COPY,DISP=(KEEP),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=29,BLKSIZE=1450)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The same process in z/VM is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FILEDEF OUTTAPE TAP1 SL (BLOCK 1450 LRECL 29 RECFM FB&lt;br /&gt;
LABELDEF OUTTAPE VOLID 123456 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reloading files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For step 4 of [[#Techniques for reorganization|Techniques for reorganization]], reloading the file, COPY becomes input to the File Load run:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE PEOPLE&lt;br /&gt;
parameters         File parameters that may reflect&lt;br /&gt;
    .              required changes&lt;br /&gt;
    .&lt;br /&gt;
    .&lt;br /&gt;
END&lt;br /&gt;
OPEN PEOPLE&lt;br /&gt;
INITIALIZE&lt;br /&gt;
DEFINE FIELD NAME WITH KEY&lt;br /&gt;
DEFINE FIELD AGE WITH KEY RANGE&lt;br /&gt;
DEFINE FIELD SEX WITH KEY CODED FEW-VALUED&lt;br /&gt;
FLOD -1,-1,0&lt;br /&gt;
 NAME=1,20,X&#039;8000&#039;&lt;br /&gt;
 AGE=21,3&lt;br /&gt;
 SEX=24,6&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Using PAI FLOD for files with varying record formats===&lt;br /&gt;
&amp;lt;p&amp;gt;If your files contain different record types and varying record formats, you might want to have a general utility program to reorganize a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Copying files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The PERSONEL file has many field names and several types of records. For step 1 of [[#Techniques for reorganization|Techniques for reorganization]], use the following commands and User Language request:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PERSONEL&lt;br /&gt;
RESET UDDLPP = 0,UDDCCC = 0&lt;br /&gt;
USE OUTTAPE&lt;br /&gt;
BEGIN&lt;br /&gt;
   ALL:  FIND ALL RECORDS&lt;br /&gt;
         END FIND&lt;br /&gt;
   PRINT.LOOP:  FOR EACH RECORD IN ALL &lt;br /&gt;
                   PRINT &#039;*&#039;&lt;br /&gt;
                   PRINT ALL INFORMATION&lt;br /&gt;
                END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DCB information&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OUTTAPE is the name of the DD statement in the JCL of the job:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//OUTTAPE   DD   DSN=COPY,DISP=(,KEEP),UNIT=TAPE,&lt;br /&gt;
//               DCB=(RECFM=VB,LRECL=260,&lt;br /&gt;
//               BLKSIZE=1000)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;COPY sequential data set&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The previous request produces a sequential data set named COPY in which each variable-length record is either an asterisk or one field of one record in the PERSONEL file. [[#Using PAI FLOD for files with varying record formats|Using PAI FLOD for files with varying record formats]] illustrates the format of these sequential records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Step 1 Sequential Record Layout&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; Column &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt; 1 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;2 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;3 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;4 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;5 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;6 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;7 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;8 &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Length &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Reserved &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;Field name=value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Parameter settings for the sequential data set&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The field name begins in column 5 and spaces are required before and after the equal sign. If the field name=value portion of any line exceeds the value of the LOBUFF parameter, reset LOBUFF in the EXEC statement, and set LRECL in the OUTTAPE DD statement to LOBUFF plus 4. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default values of 1,000,000 for the MUDD, MOUT, and MDKRD parameters might need to be adjusted upward for PAI dumps on large files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reloading files using the File Load utility&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For step 4 of [[#Techniques for reorganization|Techniques for reorganization]], the COPY data set is input to a file load program that uses the D statement; see the description of the File Load utility. The following sequence reloads the records from COPY.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE PERSONEL&lt;br /&gt;
parameters&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
END&lt;br /&gt;
OPEN PERSONEL&lt;br /&gt;
INITIALIZE&lt;br /&gt;
DEFINE fields           Field definitions that may reflect&lt;br /&gt;
   .                    required changes.&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
FLOD -1,-1,0&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#21                     Top of loop&lt;br /&gt;
G                         Get record from TAPEI&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=24,5,*                 Asterisk; go to start new record&lt;br /&gt;
I 13,,,0                Initialize to zero&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#22                     Top of equal sign search loop&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=23,6|13,=              Equal sign; go to compute value length&lt;br /&gt;
I 13,,,1|13             Increment field name length&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=22                     Continue search for equal sign&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#23                     Equal sign found&lt;br /&gt;
I 14,1,2,-7,-1|13       Compute proper value length&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=25,4|15*Y              Flag set to Y; go to store first field&lt;br /&gt;
D 5,0|13=8|13,0|14      Store field (other than first) in record&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=21                     Go to top of loop&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#24                     New record starting&lt;br /&gt;
I 15,,,232              Set flag to decimal value of EBCDIC Y&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=21                     Go to top of loop&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#25                     Storing first field&lt;br /&gt;
D 5,0|13=8|13,0|14,X&#039;8000&#039;  Set mode bit to begin a new record&lt;br /&gt;
I 15                    Reset flag register&lt;br /&gt;
END&lt;br /&gt;
EOJ&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The line after label 24 starts a new record. With minor modifications to this generalized file load program you can reorganize different &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; files.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Reorganizing or loading a file that contains Large Objects===&lt;br /&gt;
&amp;lt;p&amp;gt;A &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file that contains Large Object data can be reorganized as described in [[#Using PAI FLOD for files with varying record formats|Using PAI FLOD for files with varying record formats]], which uses the User Language PAI (PRINT ALL INFORMATION) statement to unload the data from a file, and a standard FLOD program to reload the data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;PAI statement for... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Output is formatted as...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Non-LOB field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FILELDNAME=FIELDVALUE&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOB field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FIELDNAME=DESCRIPTOR &lt;br /&gt;
LOB data line 1 &lt;br /&gt;
LOB data line 2 &lt;br /&gt;
... &lt;br /&gt;
LOB data line n&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a LOB field, the data value is replaced by a LOB descriptor, which contains information such as the LOB length and RESERVE value. The LOB descriptor contains unprintable characters. The actual LOB value then follows on subsequent records; as many as are required to hold the LOB value-depending on the OUTMRL of the output data set to which the PAI output is directed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When a FLOD runs a statement to load a field value, it checks whether the field is a LOB, and if so processing assumes that the data is formatted as illustrated in the previous table-namely, the FIELDVALUE is actually a descriptor-and loads it accordingly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The descriptor format is normally of no concern to the file manager or FLOD programmer, as the descriptor is built by the PAI statement that unloaded the data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you need to build the LOB descriptor yourself, for example, for an initial load of a file that contains Large Object data, see &amp;quot;Building a Large Object descriptor&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Reorganizing sorted and hash key files==&lt;br /&gt;
&amp;lt;p&amp;gt;For sorted or hash key files, you need to modify the generalized file load program shown in [[#Using PAI FLOD for files with varying record formats|Using PAI FLOD for files with varying record formats]]. Load the sort or hash key by the file load statement that starts a new record. Consider the following factors:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Key may or may not be the first field printed by the PAI request.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Key may or may not appear in every record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Length of the key value may or may not be the same in every record. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These factors are discussed in the following sections, followed by examples of the PAI FLOD reorganization method illustrating different combinations of sort or hash key characteristics.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Reorganizing hash key files with the PAI FLOD method requires twice as much Table B I/O as for other types of files. Hash key files might require significantly more time if you do not use the M204HASH utility to presort the TAPEI input date to FLOD or FILELOAD. For more information on the M204HASH utility, see [[ Hash Key Files#Hash Key Files|Hash Key Files]].    &amp;lt;/p&amp;gt;&lt;br /&gt;
===Modifying the PAI request for preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;When the sort or hash key is a preallocated field, or when a file contains no preallocated fields, the key appears first in the PAI output. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When preallocated fields are used but the sort or hash key is not one of the preallocated fields, you need to modify the PAI request to print the sort or hash key value first for each record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, you need to modify the file load program to load the sort or hash key as the first field and skip the second occurrence that results from the PAI statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, the sort or hash key field position is unknown, the sort or hash key field is required in every record, the sort or hash key field value length is constant, and the sort or hash key field is not necessarily the first field printed by the PAI request. The following assumptions are made:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort or hash key is a field called FILEKEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FILEKEY appears in every record (FILEORG X&#039;02&#039; bit is on).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FILEKEY might not be the first field printed by the PAI request. (There are preallocated fields in the file, but FILEKEY is not one of them.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of FILEKEY always has a length of 8.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No other fields in the file have names beginning with the character string &amp;quot;FILEKEY &amp;quot; (FILEKEY followed by a blank), which would be skipped by the CASE statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The data in the file is dumped to a sequential data set called OUTTAPE with the same DCB attributes as described on [[#Using PAI FLOD for files with varying record formats|Using PAI FLOD for files with varying record formats]]. The procedure used to dump the data is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&lt;br /&gt;
&amp;lt;/var&amp;gt;RESET UDDLPP=0,UDDCCC=0&lt;br /&gt;
USE OUTTAPE&lt;br /&gt;
BEGIN&lt;br /&gt;
   ALL:  FIND ALL RECORDS&lt;br /&gt;
         END FIND&lt;br /&gt;
   PRINT.LOOP: FOR EACH RECORD IN ALL&lt;br /&gt;
                  PRINT &#039;*&#039;&lt;br /&gt;
                  PRINT FILEKEY&lt;br /&gt;
                  PRINT ALL INFORMATION&lt;br /&gt;
               END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following FILELOAD program loads the data from OUTTAPE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#21&lt;br /&gt;
G&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=24,5,*           Asterisk; go to start new record.&lt;br /&gt;
CASE 5,8          Skip loading second occurrence of&lt;br /&gt;
 FILEKEY=21       FILEKEY produced by&lt;br /&gt;
ENDCASE           PRINT ALL INFORMATION statement.&lt;br /&gt;
I 13,,,0          Initialize counter to 0.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#22&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=23,6|13,=        Look for = starting in col. 6.&lt;br /&gt;
I 13,,,1|13       Increment field name length.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=22               Continue search for equal sign.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#23               Come here when equal sign found.&lt;br /&gt;
I 14,1,2,-7,-1|13      Compute length of value.&lt;br /&gt;
D 5,0|13=8|13,0|14     Store field in record.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=21&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#24             Come here when asterisk found.&lt;br /&gt;
G               Get next record - contains FILEKEY.&lt;br /&gt;
 FILEKEY=5,8,X&#039;8000&#039;    Begin new record.&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Modifying the PAI request for files in which the sort or hash key is not required===&lt;br /&gt;
&amp;lt;p&amp;gt;For a sorted or hash key file in which the sort or hash key is not required in every record, modify the file load program to determine whether the sort or hash key exists. If it does not exist, load the first field with mode bits of X&#039;A000&#039;. In the following example, the sort or hash key might not be in every record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a sort or hash key file in which the key value is variable in length, compute the value length. The same statements that are used to compute the length of the values of other fields can be used to compute the length of the value of the sort or hash key. In the following example, the key value length is variable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sort or hash key file reorganization examples use a slight modification of the PAI FLOD reorganization method described on [[#Using PAI FLOD for files with varying record formats|Using PAI FLOD for files with varying record formats]]. They apply to either sorted or hash key files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sort or hash key not required, PAI sample request&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, the sort or hash key field position is known, the sort or hash key field is not required in every record, and the sort or hash key field value length is variable. Specifically, the following assumptions are made:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort or hash key is a field called FILEKEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FILEKEY might not appear in every record (FILEORG X&#039;02&#039; bit is off).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FILEKEY is always the first field printed by the PAI request.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Length of the value of FILEKEY is variable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No other fields in the file have names beginning with the character string &amp;quot;FILEKEY &amp;quot; (FILEKEY followed by a blank). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The data in the file is dumped to a sequential data set (called OUTTAPE) with the same DCB attributes described on [[#Using PAI FLOD for files with varying record formats|Using PAI FLOD for files with varying record formats]]. The procedure used to dump the data is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN filename&lt;br /&gt;
RESET UDDLPP=0,UDDCCC=0&lt;br /&gt;
USE OUTTAPE&lt;br /&gt;
BEGIN&lt;br /&gt;
   ALL:  FIND ALL RECORDS&lt;br /&gt;
         END FIND&lt;br /&gt;
   PRINT.LOOP:  FOR EACH RECORD IN ALL&lt;br /&gt;
                   PRINT &#039;*&#039;&lt;br /&gt;
                   PRINT ALL INFORMATION&lt;br /&gt;
                END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following FILELOAD program loads the data from OUTTAPE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
I 2,,,1             Constant value 1 for comparison.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#21&lt;br /&gt;
G&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=24,5,*             Asterisk; turn on start-new-rec flag.&lt;br /&gt;
I 13,,,0            Initialize counter to 0.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#22&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=23,6|13,=          Look for = starting in col. 6.&lt;br /&gt;
I 13,,,1|13         Increment field name length.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=22                 Continue search for equal sign.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#23                 Come here when equal sign found.&lt;br /&gt;
I 14,1,2,-7,-1|13   Compute length of value.&lt;br /&gt;
T 25,1|1*4,1|2*8    Go to 25 if start-new-rec flag is on.&lt;br /&gt;
D 5,0|13=8|13,0|14  Else, load field into rec.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=21                 Go get next field.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#25                 Here when start-new-rec flag is on.&lt;br /&gt;
CASE 5,8            Use different mode bits when&lt;br /&gt;
 FILEKEY =26        FILEKEY exists in&lt;br /&gt;
ENDCASE             current record.&lt;br /&gt;
D 5,0|13=8|13,0|14,X&#039;A000&#039;    No FILEKEY; use X&#039;A000&#039;&lt;br /&gt;
I 1,,,0             Turn off start-new-rec flag.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=21                 Go get next field.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#26                 Come here when FILEKEY exists in rec.&lt;br /&gt;
 FILEKEY=15,0|14,X&#039;8000&#039;      Load FILEKEY.&lt;br /&gt;
I 1,,,0             Turn off start-new-rec flag.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=21                 Go get next field.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#24                 Come here when asterisk found.&lt;br /&gt;
I 1,,,1             Turn on start-new-rec flag.&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Reorganizing INVISIBLE fields==&lt;br /&gt;
&amp;lt;p&amp;gt;If your site has any records with INVISIBLE fields, you need to build provisions into step 1 (from [[#Techniques for reorganization|Techniques for reorganization]]) of either method to reorganize the files that have INVISIBLE fields. INVISIBLE fields do not occupy space in Table B and must be re-created by other means. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Reorganizing INVISIBLE FRV fields===&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if the PERSONEL file has an INVISIBLE FRV field called TYPE, which implies the record type, modify the PAI FLOD request as follows:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
   TYPE:   FOR EACH VALUE OF TYPE&lt;br /&gt;
   TYPE.VAL:  FIND ALL RECORDS FOR WHICH&lt;br /&gt;
                 TYPE = VALUE IN TYPE&lt;br /&gt;
              END FIND&lt;br /&gt;
              FOR EACH RECORD IN TYPE.VAL&lt;br /&gt;
                 PRINT &#039;*&#039;&lt;br /&gt;
                 PRINT &#039;TYPE = &#039; WITH VALUE IN TYPE&lt;br /&gt;
                 PRINT ALL INFORMATION&lt;br /&gt;
               END FOR&lt;br /&gt;
            END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This request assumes that there is only one occurrence of TYPE for each record, and that each record has a TYPE value.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Reorganizing INVISIBLE NON-FRV fields===&lt;br /&gt;
&amp;lt;p&amp;gt;INVISIBLE fields that are NON-FRV must be derived by other means. Many INVISIBLE fields can be created from another VISIBLE field in the record. For example, an INVISIBLE KEY field LAST NAME can be carried in the same record as the VISIBLE field NAME. Use the $SUBSTR and $INDEX functions to extract the value for LAST NAME from NAME. This value can then be included in the fixed format record or the PAI reorganization. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed-format dump example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, for a fixed-format dump:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
   ALL:  FIND ALL RECORDS&lt;br /&gt;
         END FIND&lt;br /&gt;
   PROCESS.LP:  FOR EACH RECORD IN ALL&lt;br /&gt;
                   %LN = $SUBSTR(NAME,$INDEX(NAME,&#039; &#039;)+1)&lt;br /&gt;
                   PRINT NAME WITH AGE AT COLUMN 21 -&lt;br /&gt;
                      WITH SEX AT COLUMN 24 -&lt;br /&gt;
                      WITH %LN AT COLUMN 30&lt;br /&gt;
                END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;PAI FLOD example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For a PAI FLOD:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
   ALL:  FIND ALL RECORDS&lt;br /&gt;
         END FIND&lt;br /&gt;
   PROCESS.LP:  FOR EACH RECORD IN ALL&lt;br /&gt;
                   %LN = $SUBSTR(NAME,$INDEX(NAME,&#039; &#039;)+1)&lt;br /&gt;
                   PRINT &#039;*&#039;&lt;br /&gt;
                   PRINT ALL INFORMATION&lt;br /&gt;
                   PRINT &#039;LAST NAME = &#039; WITH %LN&lt;br /&gt;
                END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Step 4 can load the field LAST NAME in the same manner in which the other fields are loaded. Although the value is part of the records in the sequential data set, it is not stored in Table B if the field description established in a DEFINE command indicates it is INVISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Take care in the file design process to evaluate reorganization requirements and anticipate which technique, if necessary at all, is most suitable.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Copying procedures==&lt;br /&gt;
&amp;lt;p&amp;gt;Before reorganizing any file that contains procedures, dump the procedures from the file to a sequential data set as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RESET UDDLPP=0,UDDCCC=80&lt;br /&gt;
USE OUTPROCS&lt;br /&gt;
OPEN FILEX&lt;br /&gt;
DISPLAY (ALIAS,LABEL) ALL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DCB information&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OUTPROCS is the name of the following DD statement in the JCL of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//OUTPROCS  DD   DSN=PROCS,DISP=(,KEEP),&lt;br /&gt;
//               DCB=(LRECL=80,BLKSIZE=80,RECFM=F,),...&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or, an alternate:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//OUTPROCS  DD   DSN=PROCS,DISP=(,KEEP),&lt;br /&gt;
//               DCB=(LRECL=80,BLKSIZE=n*80,RECFM=FB,),...&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A data set concatenated to a DD* data set line //CAIN DD * must be compatible with the DCB of the DD* data set which is DCB=(LRECL=80,BLKSIZE=N*80, RECFM=F OR FB). A tape or disk data set can be used.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Copying secured procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;If procedure security is in effect, make sure that the user issuing the DISPLAY command has the authority to display all procedures (DISPLAY ALL command) to avoid losing any secured procedures.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Reloading procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;After the file has been reloaded, reload the procedures by running a batch job that has the PROCS data set as part of the concatenated input stream:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure to include the *LOWER command after the OPEN if the procedures contain uppercase and lowercase characters.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any procedure line exceeds 72 characters, include (in the EXEC statement) settings of INMRL and INCCC large enough to accommodate the longest line. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//CCAIN      DD   *&lt;br /&gt;
PAGESZ=6184&lt;br /&gt;
OPEN FILEX&lt;br /&gt;
password&lt;br /&gt;
/*&lt;br /&gt;
//           DD   DSN=PROCS,DISP=OLD,...&lt;br /&gt;
//           DD   *&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Reloading a small number of procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;If you are reloading a small number of procedures that do not have aliases, it may be easier to copy the procedures to another &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, and then copy them back. Using this method of copying procedures causes any aliases to be removed when the file is initialized (step 3 of [[#Techniques for reorganization|Techniques for reorganization]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the PEOPLE file, which contains five procedures, needs to be reorganized. The JUNK file is a file with no procedures in it, created for this purpose. To perform step 2 of [[#Techniques for reorganization|Techniques for reorganization]], open the PEOPLE and JUNK files, and issue the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IN PEOPLE COPY PROCEDURE ALL TO JUNK&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Step 6 is then the reverse command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IN JUNK COPY PROCEDURE ALL TO PEOPLE&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For more information on the COPY PROCEDURE command, refer to the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;z/VSE does not allow data set concatenation. However, with z/VSE/POWER using the * $$ PUN statement and the USE data set facility, you can create a job to reload procedures:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;* $$ PUN DISP=I,CLASS=I&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
DEFINE DATASET OUTPROCS WITH SCOPE=SYSTEM -&lt;br /&gt;
   FILENAME=SYSPCH LRECL=80 RECFM=F&lt;br /&gt;
RESET UDDLPP=0,UDDCCC=80&lt;br /&gt;
USE OUTPROCS&lt;br /&gt;
BEGIN&lt;br /&gt;
PRINT &#039;// JOB LOAD PROCEDURES&#039;&lt;br /&gt;
PRINT &#039;// OPTION SYSPARM=&#039;&#039;INCCC=80&#039;&#039;&#039;&lt;br /&gt;
.                      Print out JCL and user zero input&lt;br /&gt;
.                      to precede displayed procedures.&lt;br /&gt;
END&lt;br /&gt;
USE OUTPROCS&lt;br /&gt;
DISPLAY (ALIAS,LABEL) ALL&lt;br /&gt;
USE OUTPROCS&lt;br /&gt;
BEGIN&lt;br /&gt;
PRINT &#039;EOJ&#039;&lt;br /&gt;
PRINT &#039;/*&#039;&lt;br /&gt;
PRINT &#039;/&amp;amp;amp;&#039;&lt;br /&gt;
END&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To dump procedures to a z/VM disk file, execute the following command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ONLINE BYPASS UNLDPROC&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;UNLDPROC EXEC &amp;lt;/var&amp;gt;defines the files to be used by the ONLINE command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedures are dumped to the CMS disk file, CARS PROCFILE A.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;UNLDPROC EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The UNLDPROC EXEC follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
FILEDEF CCAPRINT DISK UNLDPROC CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK UNLDPROC CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF OUTPROC DISK CARS PROCFILE A (RECFM FB LRECL 80 -&lt;br /&gt;
BLKSIZE 800&lt;br /&gt;
FILEDEF CCAIN DISK UNLDPROC CCAIN *&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128 LIBUFF 600 LOBUFF 600 INCCC 80&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;UNLDPROC CCAIN file&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CCAIN file, UNLDPROC CCAIN, is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PAGESZ=6184&lt;br /&gt;
R UDDCCC=80,UDDLPP=0&lt;br /&gt;
OPEN CARS&lt;br /&gt;
USE OUTPROC&lt;br /&gt;
DISPLAY PROC(ALIAS,LABEL) ALL&lt;br /&gt;
EOJ&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To load the procedures back into a file, execute the following command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ONLINE BYPASS LOADPROC&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LOADPROC EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following LOADPROC EXEC defines the files to be used by the ONLINE command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
FILEDEF CCAPRINT DISK LOADPROC CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK LOADPROC CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK LOADPROC CCAIN A&lt;br /&gt;
M204APND CCAIN DISK CARS PROCFILE A&lt;br /&gt;
M204APND CCAIN DISK EOJ CCAIN A&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128 LIBUFF 600 LOBUFF 600 INCCC 80&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;CCAIN files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CCAIN input consists of the following files, which are concatenated using M204APND:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LOADPROC CCAIN contains commands to open the database file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CARS PROCFILE is the z/VM disk file that the procedures were dumped to using UNLDPROC.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EOJ CCAIN contains commands to close the file and end the job.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;LOADPROC CCAIN is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PAGESZ=6184&lt;br /&gt;
OPEN CARS&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;EOJ CCAIN is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Access control table===&lt;br /&gt;
&amp;lt;p&amp;gt;For a file that uses procedure security, there is no automatic way to rebuild the access control table. Display the mapping of user classes to procedure classes with the command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DISPLAY (PRIVILEGES) ALL&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then reenter the privilege mappings with a new series of SECURE commands. Refer to the discussion of other DISPLAY command capabilities in [[ Field Display and Message Broadcast#Overview|Overview]], and to the discussion of the SECURE command.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Reorganizing the Ordered Index==&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index can be adjusted or reorganized in whole or in part to improve its performance or its spacing requirements or both. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reorganize the Ordered Index to replenish space in an Ordered Index where the deletions of B-tree entries have left many tree nodes with excessive unused space. You can also maximize the efficiency of your site&#039;s range retrievals by taking advantage of the clustering of the segment lists stored on Table D pages that results from a reorganization. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The REORGANIZE OI command is used along with the deferred update Z command (see &amp;quot;Z command&amp;quot;) to reorganize the Ordered Index.     &amp;lt;/p&amp;gt;&lt;br /&gt;
===Changing spacing parameters with REDEFINE===&lt;br /&gt;
&amp;lt;p&amp;gt;You might want to modify the spacing parameters of one or more of the ORDERED fields in the Ordered Index in response to or in anticipation of a change in the nature of the data being stored. (For example, you might anticipate a different pattern or frequency of the updates to the Ordered Index.) &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you need to change the spacing parameters of one or more of the ORDERED fields for future updating, use the REDEFINE command with the field(s) involved. See the discussion of ORDERED fields in &amp;quot;ORDERED and NON-ORDERED attributes&amp;quot;, and the REDEFINE command discussion in [[ Defining Fields Manually#Defining field retrieval attributes|Defining field retrieval attributes]], for more information about the Ordered Index B-tree structure and alteration.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===REORGANIZE OI command===&lt;br /&gt;
&amp;lt;p&amp;gt;You can issue the REORGANIZE OI command for either the entire Ordered Index or for one specified field that has the ORDERED attribute. When you issue REORGANIZE OI:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;REORGANIZE OI writes out Ordered Index deferred update records to a variable-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These deferred updates are applied to the file using the Z command. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One deferred update record is written for each record indexed in the part of the Ordered Index being reorganized. The length of the update record varies according to the length of the value that is indexed. The deferred update data set created can be very large. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For more information about variable-length deferred update data sets and applying the deferred updates using the Z command, see the deferred updates chapter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;REORGANIZE OI format&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The format for the REORGANIZE OI command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;REORGANIZE OI [&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;] &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;fieldname is an ORDERED field.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Privileges required&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This command requires file manager privileges and exclusive control of the file. It can be used only in single user runs. Before issuing REORGANIZE, open the file in deferred update mode with a variable-length deferred update data set. See the deferred updates chapter for a description of the special form of the OPEN command used for opening a file in deferred update mode.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The REORGANIZE command deletes all the entries from the part of the Ordered Index that is being reorganized, and writes the updates to rebuild the Ordered Index into the variable-length deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Rebuilding the Ordered Index with the Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;To rebuild the Ordered Index, issue the Z command. If the settings of the spacing parameters LRESERVE, NRESERVE, and IMMED are changed for any field before the Z command is issued, the Ordered Index is rebuilt using the new parameter values for that field. The new parameter values result in a different space utilization.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The data sets used by the Z command with REORGANIZE are the same as in ordinary File Load or deferred update runs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Data set containing the Ordered Index deferred update records must be named SORT5.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Data set produced by the Z command is TAPE5. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Z command clusters the Ordered Index segment lists stored on Table D list pages so that, if possible, all the lists for one or more given field name = value pairs are on the same Table D list page. This clustering dramatically improves the performance of a FIND that includes a range condition.        &amp;lt;/p&amp;gt;&lt;br /&gt;
==Dynamic data compactor for Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;The data compactor for Table B dynamically reduces the chains of extension records for unordered files. You can use the data compactor Online or in Batch.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Frequently updated files may have records with long chains of extension records spanning several pages. When a record is updated and there is not enough space on the page to store a new or changed field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates an extension record on a different page. Over time, records may acquire multiple extensions on different pages. Reducing the number of extension records may improve performance, especially for scanning long records, and free the record numbers used by extension records. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Understanding the constraints database===&lt;br /&gt;
&amp;lt;p&amp;gt;The constraints database is a dynamic hashed database that resides in a few virtual storage pages with any extra space needed residing in CCATEMP. In this database there are primary pages and overflow pages, also called extension records. When a primary page fills up, additional records go on to overflow pages that are chained from the primary page. When a primary page become too full, a process is evoked which splits the page into two pages. This process continues to the maximum-allowed number of primary pages at which point the splitting process stops and the overflow page chain is allowed to grow as large as required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As the constraints database contracts, this process is reversed. Those pages with only a few records are merged together or compacted. This process continues until only one page remains.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Combining extension records===&lt;br /&gt;
&amp;lt;p&amp;gt;The data compactor reduces the number of extensions by combining several extension into one. The data compactor first tries to use a page from the reuse queue for a new extension record. If no page is suitable, the compactor uses an unused page in Table B increasing the BHIGHPG parameter. The logical order of extension in a record is preserved. After writing a new extension record old ones are deleted and the space on corresponding pages may be reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Depending on the length of an extension record and the parameter settings for page reuse, the data compactor may increase or decrease the reuse queue. The COMPACTB command uses the reuse queue-adding eligible pages and deleting used pages, as would any updating program. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, you might see the following message that indicates that all free (unused) pages allowed for compaction have been used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2677: ALL FREE PAGES ALLOWED FOR COMPACTION HAVE BEEN USED. COMMAND COMPACTB ENDS.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the FREE parameter of the COMPACTB command was set at 100(%), then all unused pages are gone and the file manager must increase Table B size. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If there are some numbers of unused pages left in Table B (the difference between BSIZE and BHIGHPG), then the file manager must increase the FREE parameter.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This is the same approach &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses when allocating a new record or a new extension: to save time for the next user and speed up the allocation. The compactor makes this process very visible, because it scans many more pages on the reuse queue and may require much more free space on a pages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The data compactor does not change the order of the fields within a record. See the COMPACTB command in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementation of the COMPACTB command led to the implementation of the BLDREUSE command, anticipating that you might want to assure that as many pages as possible were available on the reuse queue for COMPACTB processing to use.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Recovery processing and the data compactor===&lt;br /&gt;
&amp;lt;p&amp;gt;Recovery supports the addition and deletion of extension records as a part of a record update, as well a creating journal entries for moving extension records. Journal entries 6 track moved extension records. &amp;lt;/p&amp;gt;&lt;br /&gt;
===[[COMPACTB command |COMPACTB]] data compaction===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTB process provides compacting results and improves performance. The following features are included in COMPACTB processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Support for files with Table X&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A DELETE option to physically delete logically deleted records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;COMPACTB processing can be used to avoid frequent file reorganizations needed to reduce the number of extension records and can also be used to reclaim space occupied by logically deleted records-some times referred to as dirty data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Recovery of the compaction process is fully supported. &amp;lt;/p&amp;gt;&lt;br /&gt;
====Improved compaction for all files====&lt;br /&gt;
&amp;lt;p&amp;gt;If a Table B base record has one and only one extension record and the base record page has sufficient free space, then the data compactor will combine the extension record with the base record and delete the extension. For a base record with multiple extensions, the compactor will try to combine the extension records into fewer extensions, but will not attempt to combine them with the base record.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Compaction for files with Table X====&lt;br /&gt;
&amp;lt;p&amp;gt;COMPACTB processing supports files defined with a Table X. Compaction for files defined with Table X have better performance, because compaction operates on a page basis instead of a record basis and locks fewer resources, especially the existence bit map.&amp;lt;/p&amp;gt;&lt;br /&gt;
====Physical delete of logically deleted records====&lt;br /&gt;
&amp;lt;p&amp;gt;A logically deleted record remains physically stored in the file. The corresponding existence bit is zero-or off-in the Existence Bit Pattern (EBP), but otherwise all fields, data, and index entries are present and consume space. The record, however, cannot be accessed because the existence bit is zero.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The data compactor can physically delete logically deleted records in files. The compactor accomplishes this by checking all records on a Table B page to verify that the EBP indicates that the record exists. For records that are physically present, but the EBP indicates that the record has been logically deleted, the compactor will delete the physical records-if requested. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The new DELETE option of the COMPACTB command specifies that the process must physically delete logically deleted records, whether the physical records are in Table B (base and extensions) or the physical records are in Table B with extensions in Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Space and record numbers freed by physically deleting logically deleted records are reusable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can use the DELETE option with all other options. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;COMPACTB FROM 15 TO 23 FREE 20 DELETE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The data compactor finds logical records with a nonzero length within the indicated record number range (in the previous example, 15 to 23) that do not exist in the EBP and deletes the data and index entries for such records. This example also releases 20% of the unused or free pages to the data compactor, which can be used for new extension records. Files with lock pending updates (LPU) disabled are processed with the data compactor placing an exclusive enqueue on the entire file. In this case, a warning message is issued. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with many logically deleted records, processing the DELETE option may be CPU and I/O intensive. The following new message is printed at the completion of data compactor processing that states the total number of deleted records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2754: NUMBER OF DELETED LOGICALLY DELETED RECORDS: count&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All statistical information from compaction is presented as &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; messages, as shown in the following COMPACTB command outputs. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;COMPACTB using the FREE option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;COMPACTB FREE 85&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2749: FILE &#039;&#039;filename&#039;&#039; NUMBER OF BASIC RECORDS PROCESSED:               36000&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2750: FILE &#039;&#039;filename&#039;&#039; NUMBER OF EXTENSION RECORDS BEFORE COMPACTION:   110001&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2751: FILE &#039;&#039;filename&#039;&#039; NUMBER OF EXTENSION RECORDS AFTER COMPACTION:    35991&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2752: FILE &#039;&#039;filename&#039;&#039; NUMBER OF NOT PROCESSED (LOCKED) RECORDS:        0&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2753: FILE &#039;&#039;filename&#039;&#039; NUMBER OF FREE PAGES USED:                       1026&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;COMPACTB using the DELETE option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;COMPACTB DELETE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2749: FILE &#039;&#039;filename&#039;&#039; NUMBER OF BASIC RECORDS PROCESSED:              35000&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2750: FILE &#039;&#039;filename&#039;&#039; NUMBER OF EXTENSION RECORDS BEFORE COMPACTION:  106952&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2751: FILE &#039;&#039;filename&#039;&#039; NUMBER OF EXTENSION RECORDS AFTER COMPACTION:   34991&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2752: FILE &#039;&#039;filename&#039;&#039; NUMBER OF NOT PROCESSED (LOCKED) RECORDS:       0&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2753: FILE &#039;&#039;filename&#039;&#039; NUMBER OF FREE PAGES USED:                      755&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2754: FILE &#039;&#039;filename&#039;&#039; NUMBER OF DELETED LOGICALLY DELETED RECORDS:    1000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Dynamic data compactor for Table E==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Model 204 files where [[FILEORG parameter|FILEORG]] x&#039;100&#039; is not set large objects are stored as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The [[COMPACTE command]] lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed.&amp;lt;/p&amp;gt; &lt;br /&gt;
The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Considerations for use ===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has&lt;br /&gt;
49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a&lt;br /&gt;
total size of 152 pages, then moving 49,000 pages to reclaim a modest 152&lt;br /&gt;
page gap is inefficient. On the other hand for objects with average size of 1-100&lt;br /&gt;
pages, compacting a hundred 1-page gaps is beneficial.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage&lt;br /&gt;
statistics: the number of gaps and total gap size. Because compaction is&lt;br /&gt;
heavily I/O and CPU intensive, you should compact Table E only when you can&lt;br /&gt;
expect substantial results.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you&lt;br /&gt;
must take care to prevent unnecessary page movements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E based driven by the bitmap pages, one Table E set of 49152 pages at a time. &lt;br /&gt;
Table E contains not only object pages but bitmap pages also. The compactor&amp;amp;#x2019;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;::Bitmap pages (allocated one per segment) are not moved, so the worst result&lt;br /&gt;
of compaction is two gaps per segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;::Objects residing in more than one segment are not moved.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using the TABLEE comand|TABLEE and [[COMPACTE command]]s ===&lt;br /&gt;
To effectively compact Table E, Rocket Software recommends running a&lt;br /&gt;
TABLEE command with the SEG option, identifying segments with large&lt;br /&gt;
number of gaps, running COMPACTE command for segments of interest, and&lt;br /&gt;
then running another TABLEE command for compacted segments to check the&lt;br /&gt;
results.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== COMPACTE back out and recovery ===&lt;br /&gt;
No back out capabilities are provided for Table E compaction. To facilitate recovery, the compactor writes preimages of all a large object&amp;amp;#x2019;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages.&lt;br /&gt;
::&amp;lt;p&amp;gt;For error messages generated while analyzing Table E (messages 2809,2810, 2818, 2819, 2821), a file must be regenerated.&amp;lt;/p&amp;gt;&lt;br /&gt;
::&amp;lt;p&amp;gt;For error messages generated while moving an object (messages 2811,2823) a normal file recovery should be adequate.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== COMPACTE performance===&lt;br /&gt;
Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&lt;br /&gt;
&lt;br /&gt;
=== COMPACTE and checkpoints ===&lt;br /&gt;
The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long&amp;amp;#x2014;hundreds of pages&amp;amp;#x2014;object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&lt;br /&gt;
&lt;br /&gt;
===COMPACTE results=== &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;COMPACTE&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2811: FILE &#039;&#039;filename&#039;&#039; NUMBER OF MOVED OBJECTS: 180   &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2812: FILE &#039;&#039;filename&#039;&#039; NUMBER OF MOVED PAGES:   12 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2813: FILE &#039;&#039;fielname&#039;&#039; NUMBER OF RECORD LOCKING CONFLICTS: 0 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;***  M204.2814: FILE &#039;&#039;filename&#039;&#039; NUMBER OF MULTISEGMENT OBJECTS: 5   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59469</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59469"/>
		<updated>2013-05-12T23:03:08Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Compacting Table E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of either the full logical records-a base record, plus extension(s) (that contain the values of all VISIBLE fields), or if Table X is enabled, the visible fields in the base record. This section discusses Table B by itself, and the Table X impact  is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Either way, to size the data are correctly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Creating a file with a Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Dividing data between Table B and X===&lt;br /&gt;
&amp;lt;p&amp;gt;Obviously:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no one formula for determining a unique BSIZE or XSIZE, but there are a number of approaches you may take. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records with a generally consistent size you may be able to keep most of your data in Table B and have only a small Table X for the occasional overflow.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have wildly divergent size records, size Table B so that the vast majority of the smaller size records fit in Table B so only the largest ones create extensions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records which start small, and then increase dramatically over time, consider very small (perhaps even only large enough to handle the preallocated fields) in Table B, with the rest as extensions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, as long as you understand first the overall size you would need if you were only storing the data in Table B, splitting it into the two parts is straightforward (and if [[RECRDOPT parameter|RECRDOPT]] is set to one, then sizing of Table B is trivial (how many records do you expect to have?).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The rules of use, and sizing, are quite different depending on whether the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit is set. For these differences, see:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E (File Architecture)|Table E]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E FILEORG x&#039;100&#039;]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E non x&#039;100&#039; (File Architecture)|Table E non x&#039;100&#039;]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESIZE For [[FILEORG parameter|FILEORG]] x&#039;100&#039; files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, divide by 6140 (The usable page size of 6144 less the 4 byte chain pointer) and round up. Then, multiply by the total number of Large Object fields (and probably add a percentage for growth (based on your knowledge of the data and application).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Additional considerations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have [[#Field Design (File Management)# BLOB, CLOB and MINLOBE attributes|MINLOBE]] set, ignore large objects smaller than this number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure to take that (along with the large object header) into account when sizing Tables B and X.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E for FILEORG X&#039;100&#039;]] files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESIZE for non [[FILEORG parameter|FILEORG]] x&#039;100&#039; files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Characteristics:&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Sizing:&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E non x&#039;100&#039; files is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files (or make the file an x&#039;100&#039; file). This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E non x&#039;100&#039; (File Architecture)|Table E for non FILEORG X&#039;100&#039; files]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_non-FILEORG_X%27100%27_files_(File_architecture)&amp;diff=59468</id>
		<title>Table E and non-FILEORG X&#039;100&#039; files (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_non-FILEORG_X%27100%27_files_(File_architecture)&amp;diff=59468"/>
		<updated>2013-05-12T23:01:29Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Holds Large Object Data (BLOBs and CLOBs) &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size.&lt;br /&gt;
&lt;br /&gt;
When FILEORG x&#039;100&#039;is not set on a file, this is enabled by reorganizing / [[CREATE command: File|CREATE]]ing a file with [[ESIZE parameter|ESIZE]] greater than 0, and then [[DEFINE FIELD command|defining one or more fields]] with an attribute of CLOB or BLOB (the file must have an ESIZE for the latter to occur). &lt;br /&gt;
&lt;br /&gt;
Available as of Model 204 V7.1 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Storage and manipulation of Large Objects (LOBs): &lt;br /&gt;
&lt;br /&gt;
Table E under non [[FILEORG parameter|FILEORG]] x&#039;100&#039; files remain a reasonable choice for static stores of Large Objects (scanned forms, for example). If it is expected that there will be large numbers of adds, changes and deletes, strong consideration should be given to [[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E with FILEORG x&#039;100&#039;]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bitmaps to track space availability ==&lt;br /&gt;
&lt;br /&gt;
In Table E, in addition to the pages used to store the Large Object Data, there are bitmap pages which track the page use. For every 49152 pages of Table E defined, there will be one bitmap page.&lt;br /&gt;
&lt;br /&gt;
The boundaries of these sets of records are a consideration in the execution of the [[COMPACTE command]], as the compactor process one of these sets at a time, and LOBs stored on pages that span a bitmap boundary do not participate in the compaction.   &lt;br /&gt;
&lt;br /&gt;
== Storing Large Objects ==&lt;br /&gt;
&lt;br /&gt;
When a field is defined as a large object (LOB) (the attributes [[#Field Design (File Management) BLOB attribute|BLOB]] or [[#Field Design (File Management) CLOB attribute|CLOB]]) a pointer is stored in the record (in Tables B or X) and the LOB is stored in Table E. &lt;br /&gt;
&lt;br /&gt;
=== Pointer in the record ===&lt;br /&gt;
&lt;br /&gt;
When you store a Large Object value in Table E, a Large Object descriptor is stored in Table B (or X depending on where the field is being ADDed). The descriptor contains the length, reserve, and a pointer to the Large Object data in the Table E page and is 27 bytes long.&lt;br /&gt;
&lt;br /&gt;
=== Large Object Header ===&lt;br /&gt;
&amp;lt;p&amp;gt;Every large object stored in Table E starts with a Large Object Header (this is used to make the [[COMPACTE command|Table E compact]]ion work better. The large object header contains a field for the Table B record number that points to the large object&amp;amp;#x2014;thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note: Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, the first 6110 bytes (non preallocated) of a large object are on the first Table E page (while later pages will fit 6144 bytes). If you plan on storing a large number of relatively small LOBs, this size differential needs to be taken into account when sizing Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table E Space Utilization ===&lt;br /&gt;
&lt;br /&gt;
Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data (the first page only 6112 due to the header).&lt;br /&gt;
&amp;lt;p&amp;gt;::A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;::Large Object field data from 1 to 6112 bytes occupies one Table E page. If the data is from 1 to 6111 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;::Large Object data of 6113 bytes requires two Table E pages, and LOB data of 12267 bytes will take three pages (6112 + 6144 + 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Storing a Large Object ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored (and you must if you wish the object to expand in size after its initial store), then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG&amp;amp;#x2014;even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages&lt;br /&gt;
in Table E. Unused pages are a result of deleting Large Object data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large&lt;br /&gt;
Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you use [[FILEORG parameter|FILEORG]] x&#039;100&#039;files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The following Parameters and Commands relate to the Use of Table E==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[COMPACTE command]]&lt;br /&gt;
|Defragment the contents of Table E&lt;br /&gt;
|-&lt;br /&gt;
|[[EHIGHPG parameter]]&lt;br /&gt;
|The highest active Table E page. (The first page in Table E is page zero.)&lt;br /&gt;
|-&lt;br /&gt;
|[[EPGSUSED parameter]]&lt;br /&gt;
|The number of Table E pages currently in use.&lt;br /&gt;
|-&lt;br /&gt;
|[[ESIZE parameter]]&lt;br /&gt;
|The number of pages in Table E&lt;br /&gt;
|-&lt;br /&gt;
|[[FILEORG parameter]]&lt;br /&gt;
|The file organisation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_non-FILEORG_X%27100%27_files_(File_architecture)&amp;diff=59467</id>
		<title>Table E and non-FILEORG X&#039;100&#039; files (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_non-FILEORG_X%27100%27_files_(File_architecture)&amp;diff=59467"/>
		<updated>2013-05-12T22:58:07Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Large Object Header */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Holds Large Object Data (BLOBs and CLOBs) &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
When FILEORG x&#039;100&#039;is set on a file, this is enabled by reorganizing / [[CREATE command: File|CREATE]]ing a file with [[ESIZE parameter|ESIZE]] greater than 0, and then [[DEFINE FIELD command|defining one or more fields]] with an attribute of CLOB or BLOB (the file must have an ESIZE for the latter to occur). &lt;br /&gt;
&lt;br /&gt;
Available as of Model 204 V7.1 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Storage and manipulation of Large Objects (LOBs): &lt;br /&gt;
&lt;br /&gt;
Table E under non [[FILEORG parameter|FILEORG]] x&#039;100&#039; files remain a reasonable choice for static stores of Large Objects (scanned forms, for example). If it is expected that there will be large numbers of adds, changes and deletes, strong consideration should be given to [[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E with FILEORG x&#039;100&#039;]].&lt;br /&gt;
&lt;br /&gt;
== Bitmaps to track space availability ==&lt;br /&gt;
&lt;br /&gt;
In Table E, in addition to the pages used to store the Large Object Data, there are bitmap pages which track the page use. For every 49152 pages of Table E defined, there will be one bitmap page.&lt;br /&gt;
&lt;br /&gt;
The boundaries of these sets of records are a consideration in the execution of the [[COMPACTE command]], as the compactor process one of these sets at a time, and LOBs stored on pages that span a bitmap boundary do not participate in the compaction.   &lt;br /&gt;
&lt;br /&gt;
== Storing Large Objects ==&lt;br /&gt;
&lt;br /&gt;
When a field is defined as a large object (LOB) (the attributes [[#Field Design (File Management) BLOB attribute|BLOB]] or [[#Field Design (File Management) CLOB attribute|CLOB]]) a pointer is stored in the record (in Tables B or X) and the LOB is stored in Table E. &lt;br /&gt;
&lt;br /&gt;
=== Pointer in the record ===&lt;br /&gt;
&lt;br /&gt;
When you store a Large Object value in Table E, a Large Object descriptor is stored in Table B (or X depending on where the field is being ADDed). The descriptor contains the length, reserve, and a pointer to the Large Object data in the Table E page and is 27 bytes long.&lt;br /&gt;
&lt;br /&gt;
=== Large Object Header ===&lt;br /&gt;
&amp;lt;p&amp;gt;Every large object stored in Table E starts with a Large Object Header (this is used to make the [[COMPACTE command|Table E compact]]ion work better. The large object header contains a field for the Table B record number that points to the large object&amp;amp;#x2014;thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Note: Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;So, the first 6110 bytes (non preallocated) of a large object are on the first Table E page (while later pages will fit 6144 bytes). If you plan on storing a large number of relatively small LOBs, this size differential needs to be taken into account when sizing Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table E Space Utilization ===&lt;br /&gt;
&lt;br /&gt;
Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data (the first page only 6112 due to the header).&lt;br /&gt;
&amp;lt;p&amp;gt;::A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;::Large Object field data from 1 to 6112 bytes occupies one Table E page. If the data is from 1 to 6111 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;::Large Object data of 6113 bytes requires two Table E pages, and LOB data of 12267 bytes will take three pages (6112 + 6144 + 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Storing a Large Object ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored (and you must if you wish the object to expand in size after its initial store), then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG&amp;amp;#x2014;even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages&lt;br /&gt;
in Table E. Unused pages are a result of deleting Large Object data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large&lt;br /&gt;
Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you use [[FILEORG parameter|FILEORG]] x&#039;100&#039;files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The following Parameters and Commands relate to the Use of Table E==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|[[COMPACTE command]]&lt;br /&gt;
|Defragment the contents of Table E&lt;br /&gt;
|-&lt;br /&gt;
|[[EHIGHPG parameter]]&lt;br /&gt;
|The highest active Table E page. (The first page in Table E is page zero.)&lt;br /&gt;
|-&lt;br /&gt;
|[[EPGSUSED parameter]]&lt;br /&gt;
|The number of Table E pages currently in use.&lt;br /&gt;
|-&lt;br /&gt;
|[[ESIZE parameter]]&lt;br /&gt;
|The number of pages in Table E&lt;br /&gt;
|-&lt;br /&gt;
|[[FILEORG parameter]]&lt;br /&gt;
|The file organisation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59466</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59466"/>
		<updated>2013-05-12T22:50:38Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Sizing Table E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of either the full logical records-a base record, plus extension(s) (that contain the values of all VISIBLE fields), or if Table X is enabled, the visible fields in the base record. This section discusses Table B by itself, and the Table X impact  is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Either way, to size the data are correctly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Creating a file with a Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Dividing data between Table B and X===&lt;br /&gt;
&amp;lt;p&amp;gt;Obviously:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no one formula for determining a unique BSIZE or XSIZE, but there are a number of approaches you may take. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records with a generally consistent size you may be able to keep most of your data in Table B and have only a small Table X for the occasional overflow.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have wildly divergent size records, size Table B so that the vast majority of the smaller size records fit in Table B so only the largest ones create extensions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records which start small, and then increase dramatically over time, consider very small (perhaps even only large enough to handle the preallocated fields) in Table B, with the rest as extensions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, as long as you understand first the overall size you would need if you were only storing the data in Table B, splitting it into the two parts is straightforward (and if [[RECRDOPT parameter|RECRDOPT]] is set to one, then sizing of Table B is trivial (how many records do you expect to have?).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The rules of use, and sizing, are quite different depending on whether the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit is set. For these differences, see:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E (File Architecture)|Table E]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E FILEORG x&#039;100&#039;]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E non x&#039;100&#039; (File Architecture)|Table E non x&#039;100&#039;]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESIZE For [[FILEORG parameter|FILEORG]] x&#039;100&#039; files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, divide by 6140 (The usable page size of 6144 less the 4 byte chain pointer) and round up. Then, multiply by the total number of Large Object fields (and probably add a percentage for growth (based on your knowledge of the data and application).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Additional considerations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have [[#Field Design (File Management)# BLOB, CLOB and MINLOBE attributes|MINLOBE]] set, ignore large objects smaller than this number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure to take that (along with the large object header) into account when sizing Tables B and X.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E for FILEORG X&#039;100&#039;]] files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESIZE for non [[FILEORG parameter|FILEORG]] x&#039;100&#039; files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Characteristics:&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Sizing:&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E non x&#039;100&#039; files is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files (or make the file an x&#039;100&#039; file). This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E non x&#039;100&#039; (File Architecture)|Table E for non FILEORG X&#039;100&#039; files]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59465</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59465"/>
		<updated>2013-05-12T22:48:41Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Sizing and managing Table E */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of either the full logical records-a base record, plus extension(s) (that contain the values of all VISIBLE fields), or if Table X is enabled, the visible fields in the base record. This section discusses Table B by itself, and the Table X impact  is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Either way, to size the data are correctly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Creating a file with a Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Dividing data between Table B and X===&lt;br /&gt;
&amp;lt;p&amp;gt;Obviously:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no one formula for determining a unique BSIZE or XSIZE, but there are a number of approaches you may take. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records with a generally consistent size you may be able to keep most of your data in Table B and have only a small Table X for the occasional overflow.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have wildly divergent size records, size Table B so that the vast majority of the smaller size records fit in Table B so only the largest ones create extensions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records which start small, and then increase dramatically over time, consider very small (perhaps even only large enough to handle the preallocated fields) in Table B, with the rest as extensions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, as long as you understand first the overall size you would need if you were only storing the data in Table B, splitting it into the two parts is straightforward (and if [[RECRDOPT parameter|RECRDOPT]] is set to one, then sizing of Table B is trivial (how many records do you expect to have?).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The rules of use, and sizing, are quite different depending on whether the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit is set. For these differences, see:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E (File Architecture)|Table E]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E FILEORG x&#039;100&#039;]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;[[Table E non x&#039;100&#039; (File Architecture)|Table E non x&#039;100&#039;]]&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESIZE For [[FILEORG parameter|FILEORG]] x&#039;100&#039; files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, divide by 6140 (The usable page size of 6144 less the 4 byte chain pointer) and round up. Then, multiply by the total number of Large Object fields (and probably add a percentage for growth (based on your knowledge of the data and application).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Additional considerations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have [[#Field Design (File Management)# BLOB, CLOB and MINLOBE attributes|MINLOBE]] set, ignore large objects smaller than this number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure to take that (along with the large object header) into account when sizing Tables B and X.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E for FILEORG X&#039;100&#039;]] files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== ESIZE for non [[FILEORG parameter|FILEORG]] x&#039;100&#039; files ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Characteristics:&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Sizing:&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E non x&#039;100&#039; files is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E non x&#039;100&#039; (File Architecture)|Table E for non FILEORG X&#039;100&#039; files]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59464</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59464"/>
		<updated>2013-05-12T22:21:05Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Record Growth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique (but temporary... it will likely change when the file is reorganized) internal record number (IRN) that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Is just that: a way to describe all of the data held against the record key (presuming there is one)...&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The base record is the first (and, often, only) part of the record. It is assigned a slot in Table B, and its internal record number is how Model 204 identifies the record for indexing peuporses as well as in record sets and lists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a full record is not able to fit on a particular page (either, it itself may be more than 6140 bytes, or other records on the page do not leave sufficient space for the record) one or more extension records are stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table X (File Architecture)|Table X]] is enables, all such extensions are stored there, otherwise the extension(s) are stored in Table B.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Record Growth&amp;quot;&amp;gt;Record Growth&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[ADD statement]] (or the file load process) always places new data at the end of a record, and so, the record growth is straightforward: add a fuield at the end of the record, if it doesn&#039;t fit, start a new extension.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[INSERT statement|INSERT]]s are more complicated. Whether updating fields or repeating field groups, the correct location must be found within a record, and the data inserted at that point.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is, of course, quite possible, that there will not be enough space on the page to insert it, in which case space is made by moving data from this record (after the insert point) down the extension chain. So, with large extension records, it is conceivable that a single field added to the base record (for example) might cause all of the extensions to need to change.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[|Field Design (File Management)#Preallocated fields|OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Field Design (File Management)#Preallocated Fields|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All records stored in a Model204 file will contain all of the preallocated fields (if any) for that file. These are stored based on the [[Table D (File Architecture)#Record Map of Preallocated Fields|Record Map of preallocated fields]] stored in Table D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Group (File Architecture)|Repeating Field Groups]] (RFGs)====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Permits sets of data to be managed together. Inside of the RFG is a series of field value pairs (as above) but these fields are not independent of each other.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways that large objects (data longer than 255 bytes) may be handled in a Model 204 record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [[Table E (File Architecture)|Native Large Objects in Table E]] =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Large objects stored as part of a record, contain a pointer locally (within the record) to the starting point of the Large Object in Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Starting in Model 204 V7R5, the handling and functionality of Large Objects can (by using the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit) be done rather differently. See [[Table E (File Architecture)|Table E]] for the full discussion.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The application would need to parse the input data into 255 byte chunks to store it, and then again, string it together to read it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, where large objects need to be stored that, for efficiency reasons, Tabel E be enables.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59450</id>
		<title>Table B (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59450"/>
		<updated>2013-05-10T04:43:55Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This topic covers the internal architecture of a Model 204 Table B page. &lt;br /&gt;
&lt;br /&gt;
For a discussion of the ways a File Manager may organize these pages in a file, please refer to [[File Design (File Management)]]. &lt;br /&gt;
&lt;br /&gt;
At a minimum, Table B contains all of the base records in a Model 204 file. If [[Table X (File Architecture)|Table X]] is not enabled it also contains all extension records. If [[Table E (File Architecture)|Table E]] is not enabled, then any data whose contents is greater than 255 bytes must be held as a series of repeating fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The structure of a Table B page ==&lt;br /&gt;
&lt;br /&gt;
::[[File:Table B Basic Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
Not shown is a 4 byte &#039;Reuse Queue Page Number&#039; for Unordered Files. If it is present, it is in the lower left hand corner (&#039;before&#039; (working backwards) the first record on the page). &lt;br /&gt;
&lt;br /&gt;
Each of the items in the chart are described, below:&lt;br /&gt;
&lt;br /&gt;
=== Pointers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Free Space Pointer&#039;&#039;&#039; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The free space pointer contains the location of the first byte of free space on the page (as shown in the diagram, where the last record on the page ends). On pages with no records yet stored, it points to the last byte on the page (either the very end, of just before the Reuse Queue Page Number described above).&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Record Pointer Array&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are &#039;&#039;up to&#039;&#039; [[BRECPPG parameter|BRECPPG]] record pointers. These are not physically put onto the page until the record is being added to the file.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;Up to&#039;&#039; because, (except as noted below) it is possible that, as large records are stored, there will not be room for the full number of BRECPPG on the page, and so they would not be stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Enhanced Data Handling ([[FILEORG parameter|FILEORG]] x&#039;100&#039;) files, with [[RECRDOPT parameter|RECRDOPT]] set to x&#039;01&#039;, you will always have space for the full number of BRECPPG record pointers, as their length is included in the calculation of the [[BRLIMSZ parameter]]. They still are not present on the page until the record is stored.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Internal Record Number&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The record pointer is a useful identifier of a record, and is referred to as the &#039;Internal Record Number&#039; (IRN).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If, for example, [[BRECPPG parameter|BRECPPG]] is set to 10, the first Table B page will, at most) contain records 0 to 9 (the first record in a Model 204 file is IRN 0); the second page contains IRNs 10 to 19, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Eben if all the record slots are not used, they are treated as if they were, meaning that, in the exmple above, the second page in the file will still contain IRNs 10 to 19 even if only one record is physically present on the first page.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[$CURREC]] for a handy way to retrieve the IRN.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that the IRN is not a permanent record identifier. If the file is reorganized it is highly likely that almost all records will have a different IRN afterward.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Space Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Space Management Across Pages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Records ===&lt;br /&gt;
&lt;br /&gt;
=== Further information on Records ===&lt;br /&gt;
&lt;br /&gt;
Refer to [[Record (File Architecture)|Records]] and [[Adding Records (File Architecture)|Adding Records]] for a full discussion of record architecture.&lt;br /&gt;
&lt;br /&gt;
Refer also to [[Record Design (File management)|Record design]] for the use of Model 204 Records.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) Segments&amp;quot;&amp;gt;Table B Segments&amp;lt;/div&amp;gt; ===  &lt;br /&gt;
&lt;br /&gt;
==== Definition ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used in indexing. As bit maps can contain bits covering 49152 records (usable space of 6144 * 8) records, this number of records is called a segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Importance of and Use ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to indexing, segments are used, when a procedure is compiled, to track the maximum number of Table B segments that the code needs to be able to handle (remember that sets of records are tracked via bit maps). &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[INCREASE command]] boundaries ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When Model 204 code is compiled, one of the critical things notes is the number of segments in the file. This is necessary so that space can be reserved for found sets and other record tracking methodology.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because of this, if you want to increase Table B, you can only do so to the next segment boundary (i.e.: the next multiple of 49152).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For flexibility, Rocket Software recommends that you consider the use of the [[MAXINCBP parameter]]. This parameter (expressed as a percentage) is the additional number of segements reserved in compilation for growth.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[Managing File and Table Sizes#The MAXINCBP parameter|the MAXINCBP parameter]] for a full explanation of how it works.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Use in Indexing ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The segment concept is inherent to Model 204 indexing in a number of ways. Specifically:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See [[#Table C (File Architecture)#Segment Entries |Table C Segment Entries]] for the effect of segments in the hash index.&lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#B-Tree index structure|B-Tree index structure]] for the effect of segments in the ordered index.  &lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#Bit Maps Used In Indexing|bit maps used in indexing]] for how segments relate to the detailed level of both types of indexes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) The Reuse Queue&amp;quot;&amp;gt;The Reuse Queue&amp;lt;/div&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Reuse Record Number (RRN) files ([[FILEORG parameter|FILEORG]] x&#039;04&#039; bit set) pages with sufficient space (see the [[BREUSE parameter]]) and one or more available record slots are kept in a reuse queue.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This may happen due to records (or large numbers of fields) are deleted.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These use the 4 byte reuse queue page number to track the pages&#039;s availability.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;RRN files add records to the pages from the queue before adding records to [[BHIGHPG parameter|BHIGHPG]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table B==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This table excludes the parameters used for [[Hash Key Files|Hash Key]] and [[Sorted Files]]. Please see those topics for a full discussion of their special parameters (and distinction in meanings for some of these).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also not shown are the parameters which control the [[#Resizing Tables (File Management) Automatic Increases|automatic increase]] in table size, which see.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
::{|&lt;br /&gt;
|[[BHIGHPG parameter]]&lt;br /&gt;
|Table B highest active page. Normally the high water mark of pages &amp;lt;br&amp;gt;used (except for Hash Key and Sorted files). Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BQLEN parameter]]&lt;br /&gt;
|The number of pages in the reuse queue. Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRECPPG parameter]]&lt;br /&gt;
|The maximum number of record slots on a Table B page. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRESERVE parameter]]&lt;br /&gt;
|Table B Reserved space. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSE parameter]]&lt;br /&gt;
|The minimum amount of space necessary to add a page to the reuse queue. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSED parameter]]&lt;br /&gt;
|The numberof record slots reused. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRLIMSZ parameter]]&lt;br /&gt;
|Base record size maximum. Viewable only.   &lt;br /&gt;
|-&lt;br /&gt;
|[[BSIZE parameter]]&lt;br /&gt;
|The number of pages in Table B. &lt;br /&gt;
|-&lt;br /&gt;
|[[RECRDOPT parameter]]&lt;br /&gt;
|Record storage options. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59449</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59449"/>
		<updated>2013-05-09T23:32:46Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Large Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique (but temporary... it will likely change when the file is reorganized) internal record number (IRN) that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Is just that: a way to describe all of the data held against the record key (presuming there is one)...&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The base record is the first (and, often, only) part of the record. It is assigned a slot in Table B, and its internal record number is how Model 204 identifies the record for indexing peuporses as well as in record sets and lists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a full record is not able to fit on a particular page (either, it itself may be more than 6140 bytes, or other records on the page do not leave sufficient space for the record) one or more extension records are stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table X (File Architecture)|Table X]] is enables, all such extensions are stored there, otherwise the extension(s) are stored in Table B.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Record Growth&amp;quot;&amp;gt;Record Growth&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[ADD statement]] (or the file load process) always places new data at the end of a record, and so, the record growth is straightforward: add a fuield at the end of the record, if it doesn&#039;t fit, start a new extension.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[INSERT statement|INSERT]]s are more complicated. Whether updating fields or repeating field groups, the correct location must be found within a record, and the data inserted at that point.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is, of course, quite possible, that there will not be enough space on the page to insert it, in which case space is made by moving data from this record (after the insert point) down the extension chain. So, with large extension records, it is conceivable that a single field added to the base record (for example) might cause all of the extensions to need to change.&amp;lt;/p&amp;gt;  &lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[|Field Design (File Management)#Preallocated fields|OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Field Design (File Management)#Preallocated Fields|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All records stored in a Model204 file will contain all of the preallocated fields (if any) for that file. These are stored based on the [[Table D (File Architecture)#Record Map of Preallocated Fields|Record Map of preallocated fields]] stored in Table D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Group (File Architecture)|Repeating Field Groups]] (RFGs)====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Permits sets of data to be managed together. Inside of the RFG is a series of field value pairs (as above) but these fields are not independent of each other.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways that large objects (data longer than 255 bytes) may be handled in a Model 204 record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [[Table E (File Architecture)|Native Large Objects in Table E]] =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Large objects stored as part of a record, contain a pointer locally (within the record) to the starting point of the Large Object in Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Starting in Model 204 V7R5, the handling and functionality of Large Objects can (by using the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit) be done rather differently. See [[Table E (File Architecture)|Table E]] for the full discussion.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The application would need to parse the input data into 255 byte chunks to store it, and then again, string it together to read it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, where large objects need to be stored that, for efficiency reasons, Tabel E be enables.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59448</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59448"/>
		<updated>2013-05-09T23:26:17Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique (but temporary... it will likely change when the file is reorganized) internal record number (IRN) that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Is just that: a way to describe all of the data held against the record key (presuming there is one)...&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The base record is the first (and, often, only) part of the record. It is assigned a slot in Table B, and its internal record number is how Model 204 identifies the record for indexing peuporses as well as in record sets and lists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a full record is not able to fit on a particular page (either, it itself may be more than 6140 bytes, or other records on the page do not leave sufficient space for the record) one or more extension records are stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table X (File Architecture)|Table X]] is enables, all such extensions are stored there, otherwise the extension(s) are stored in Table B.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Record Growth&amp;quot;&amp;gt;Record Growth&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The [[ADD statement]] (or the file load process) always places new data at the end of a record, and so, the record growth is straightforward: add a fuield at the end of the record, if it doesn&#039;t fit, start a new extension.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;[[INSERT statement|INSERT]]s are more complicated. Whether updating fields or repeating field groups, the correct location must be found within a record, and the data inserted at that point.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is, of course, quite possible, that there will not be enough space on the page to insert it, in which case space is made by moving data from this record (after the insert point) down the extension chain. So, with large extension records, it is conceivable that a single field added to the base record (for example) might cause all of the extensions to need to change.&amp;lt;/p&amp;gt;  &lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[|Field Design (File Management)#Preallocated fields|OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Field Design (File Management)#Preallocated Fields|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All records stored in a Model204 file will contain all of the preallocated fields (if any) for that file. These are stored based on the [[Table D (File Architecture)#Record Map of Preallocated Fields|Record Map of preallocated fields]] stored in Table D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Group (File Architecture)|Repeating Field Groups]] (RFGs)====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Permits sets of data to be managed together. Inside of the RFG is a series of field value pairs (as above) but these fields are not independent of each other.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways that large objects (data longer than 255 bytes) may be handled in a Model 204 record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [[Table E (File Architecture)|Native Large Objects in Table E]] =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Large objects stored as part of a record, contain a pointer locally (within the record) to the starting point of the Large Object in Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Starting in Model 204 V7R5, the handling and functionality of Large Objects can (by using the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit) be done rather differently. See [[Table E (File Architecture)|Table E]] for the full discussion.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The application would need to parse the input data into 255 byte chunks to store it, and then again, string it together to read it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, where large objects need to be stored that, for efficiency reasons, Tabel E be enables.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59447</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59447"/>
		<updated>2013-05-09T23:15:38Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique (but temporary... it will likely change when the file is reorganized) internal record number (IRN) that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The base record is the first (and, often, only) part of the record. It is assigned a slot in Table B, and its internal record number is how Model 204 identifies the record for indexing peuporses as well as in record sets and lists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a full record is not able to fit on a particular page (either, it itself may be more than 6140 bytes, or other records on the page do not leave sufficient space for the record) one or more extension records are stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table X (File Architecture)|Table X]] is enables, all such extensions are stored there, otherwise the extension(s) are stored in Table B.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[|Field Design (File Management)#Preallocated fields|OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Field Design (File Management)#Preallocated Fields|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All records stored in a Model204 file will contain all of the preallocated fields (if any) for that file. These are stored based on the [[Table D (File Architecture)#Record Map of Preallocated Fields|Record Map of preallocated fields]] stored in Table D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Groups (File Architecture)|Repeating Field Groups]] (RFGs)====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Permits sets of data to be managed together. Inside of the RFG is a series of field value pairs (as above) but these fields are not independent of each other.&amp;lt;/p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways that large objects (data longer than 255 bytes) may be handled in a Model 204 record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [[Table E (File Architecture)|Native Large Objects in Table E]] =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Large objects stored as part of a record, contain a pointer locally (within the record) to the starting point of the Large Object in Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Starting in Model 204 V7R5, the handling and functionality of Large Objects can (by using the [[FILEORG parameter|FILEORG]] x&#039;100&#039; bit) be done rather differently. See [[Table E (File Architecture)|Table E]] for the full discussion.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The application would need to parse the input data into 255 byte chunks to store it, and then again, string it together to read it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, where large objects need to be stored that, for efficiency reasons, Tabel E be enables.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59446</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59446"/>
		<updated>2013-05-09T23:01:32Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique (but temporary... it will likely change when the file is reorganized) internal record number (IRN) that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The base record is the first (and, often, only) part of the record. It is assigned a slot in Table B, and its internal record number is how Model 204 identifies the record for indexing peuporses as well as in record sets and lists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a full record is not able to fit on a particular page (either, it itself may be more than 6140 bytes, or other records on the page do not leave sufficient space for the record) one or more extension records are stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table X (File Architecture)|Table X]] is enables, all such extensions are stored there, otherwise the extension(s) are stored in Table B.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Preallocated Fields (File Architecture)|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All records stored in a Model204 file will contain all of the preallocated fields (if any) for that file. These are stored based on the [[Table D (File Architecture)#Record Map of Preallocated Fields|Record Map of preallocated fields]] stored in Table D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Groups (File Architecture|Repeating Field Groups]] ====&lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are two ways that large objects (data longer than 255 bytes) may be handled in a Model 204 record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== [[Table E (File Architecture)|Native Large Objects in Table E]] =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The application would need to parse the input data into 255 byte chunks to store it, and then again, string it together to read it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends that, where large objects need to be stored that, for efficiency reasons, Tabel E be enables.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_design&amp;diff=59432</id>
		<title>Record design</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_design&amp;diff=59432"/>
		<updated>2013-05-08T21:48:08Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because of the unique nature of Model 204 Records (see [[Record (File Architecture)|Record architecture]]), the translation of a logical design into Model 204 records often includes data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, if you consider a billing system, where you might consider having separate records for an invoice, and then additional records for each of the invoice lines, for a Model 204 perspective it is more likely that you would have a single record where the invoice lines simply repeat (either as a set of fields, or as a formal [[Repeating Field Group (File Architecture)|Repeating Field Group]] (RFG).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are a number of reasons why this approach suits Model 204:&amp;lt;/p&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
* Because a single read of the record makes all of the information available (think of the data as being pre-joined) performance should be better&lt;br /&gt;
* the factors usually causing the records to be defined piecemeal, notably having issues with variably occurring data, do not exist in Model 204.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;The most important thing, regardless of whether you are implementing a design in Model 204 or any platform, is to understand the data relationships.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The importance of a good logical design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If you have a good logical design, the record structure should almost jump out at the file manager: tying data which is logically connected can be efficiently, physically, tied together.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A unique record key==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike many systems, Model 204 will support records with duplicate record keys.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, while it supports it, it is often not a good idea. Perhaps you need to provide reports off of the data, or extract data to feed other systems &lt;br /&gt;
&lt;br /&gt;
==Fields and Fieldgroups==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_sizing_introduction&amp;diff=59426</id>
		<title>File sizing introduction</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_sizing_introduction&amp;diff=59426"/>
		<updated>2013-05-07T23:17:36Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Critical, Up Front Decisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview - Two approaches to File Sizing==&lt;br /&gt;
&amp;lt;p&amp;gt;After designing the data structures you are implementing (see [[Field Design (File Management)|field]] and [[Repeating Field Group Design (File Management)|Repeating Field Group design]]) there are two ways for a file manager to approach the calculation of file sizes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can take the ad-hoc approach, by making sizing estimates and either:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* iteratively load a sampling of records to verify&lt;br /&gt;
* use the development and testing process to make final sizing decisions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;or, of course, a combination of both.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alternatively, you can do a detailed analysis of the data you expect the file to contain, and try and derive precise sizes for the Model 204 tables, a laborious process.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Choosing an Approach==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most Model 204 file managers use the ad-hoc design approach. Often there is already a production file with similar characteristics to the new file you are creating. Simply copying its parameters as a starting point, is a quick way to get a file ready for development and testing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is also true that most of the sizes can be easily changed dynamically, so an extreme level of precision is not overly important.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But it is also true that the detailed rules provide a level of knowledge that the file manager should be grounded in, so, to use, or just understand the sizing rules, see [[File Size Calculation in Detail]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Critical, Up Front Decisions==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are, however, certain decisions which are more difficult to fix and so should be as &#039;correct&#039; as possible, as early as possible:&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[[ATRPG parameter|ATRPG]] and [[ASTRPPG parameter]]s&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because the [[#Table A (File Architecture)#Internal File Dictionary|Internal File Dictionary]] is hashed, it can only be resized by reorganizing / recreating the file. This involves an outage of the online, and so should be avoided.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can look at the detailed calculation rules at [[File Size Calculation in Detail#Sizing Table A|Sizing Table A]] or, given how small Table A is compared to the other tables, round up on your rough estimate for [[ATRPG parameter|ATRPG]] and round down (to try and fit fewer field definitions on each Table A page) for [[ASTRPPG parameter|ASTRPPG]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[[CSIZE parameter]]&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Like the internal file dictionary, Table C is hashed and so can not be dynamically changed.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The easiest way to make sure that this is an issue is not to define any KEY or NUMERIC RANGE fields: make them ordered instead. This has the associated advantage of, if you use [[FILEORG parameter|FILEORG]] x&#039;100&#039; files, of permitting up to 32000 field names in a file.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Number of Datasets&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can dynamically [[INCREASE command|add datasets]] to a Model 204 file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The reason that it is better not have to is that there may be JCL containing file references which would need to be updated at the same time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Unless space is at a premium, it is a good idea to define dataset(s) larger than you need, which gives you the ability to automatically, or manually, increase the Tables without issue.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_sizing_introduction&amp;diff=59425</id>
		<title>File sizing introduction</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_sizing_introduction&amp;diff=59425"/>
		<updated>2013-05-07T23:13:57Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview - Two approaches to File Sizing==&lt;br /&gt;
&amp;lt;p&amp;gt;After designing the data structures you are implementing (see [[Field Design (File Management)|field]] and [[Repeating Field Group Design (File Management)|Repeating Field Group design]]) there are two ways for a file manager to approach the calculation of file sizes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can take the ad-hoc approach, by making sizing estimates and either:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* iteratively load a sampling of records to verify&lt;br /&gt;
* use the development and testing process to make final sizing decisions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;or, of course, a combination of both.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alternatively, you can do a detailed analysis of the data you expect the file to contain, and try and derive precise sizes for the Model 204 tables, a laborious process.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Choosing an Approach==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Most Model 204 file managers use the ad-hoc design approach. Often there is already a production file with similar characteristics to the new file you are creating. Simply copying its parameters as a starting point, is a quick way to get a file ready for development and testing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It is also true that most of the sizes can be easily changed dynamically, so an extreme level of precision is not overly important.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But it is also true that the detailed rules provide a level of knowledge that the file manager should be grounded in, so, to use, or just understand the sizing rules, see [[File Size Calculation in Detail]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Critical, Up Front Decisions==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are, however, certain decisions which are more difficult to fix and so should be as &#039;correct&#039; as possible, as early as possible:&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[[ATRPG parameter|ATRPG]] and [[ASTRPPG parameter]]s&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Because the [[#Table A (File Architecture)#Internal File Dictionary|Internal File Dictionary]] is hashed, it can only be resized by reorganizing / recreating the file. This involves an outage of the online, and so should be avoided.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can look at the detailed calculation rules at [[File Size Calculation in Detail#Sizing Table A]] or, given how small Table A is compared to the other tables, round up on your rough estimate for [[ATRPG parameter|ATRPG]] and round down (to try and fit fewer field definitions on each Table A page) for [[ASTRPPG parameter|ASTRPPG]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[[CSIZE parameter]]&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Like the internal file dictionary, Table C is hashed and so can not be dynamically changed.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The easiest way to make sure that this is an issue is not to define any KEY or NUMERIC RANGE fields: make them ordered instead. This has the associated advantage of, if you use [[FILEORG parameter|FILEORG]] x&#039;100&#039; files, of permitting up to 32000 field names in a file.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Number of Datasets&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can dynamically [[INCREASE command|add datasets]] to a Model 204 file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The reason that it is better not have to is that there may be JCL containing file references which would need to be updated at the same time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Unless space is at a premium, it is a good idea to define dataset(s) larger than you need, which gives you the ability to automatically, or manually, increase the Tables without issue.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_FILEORG_X%27100%27_files_(File_architecture)&amp;diff=59424</id>
		<title>Table E and FILEORG X&#039;100&#039; files (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_E_and_FILEORG_X%27100%27_files_(File_architecture)&amp;diff=59424"/>
		<updated>2013-05-07T22:47:34Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Holds Large Object Data (BLOBs and CLOBs) &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
When FILEORG x&#039;100&#039;is set on a file, this is enabled by reorganizing / [[CREATE command: File|CREATE]]ing a file with [[ESIZE parameter|ESIZE]] greater than 0, and then [[DEFINE FIELD command|defining one or more fields]] with an attribute of CLOB or BLOB (the file must have an ESIZE for the latter to occur). &lt;br /&gt;
&lt;br /&gt;
Available as of Model 204 V7.5 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Storage and manipulation of Large Objects (LOBs): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The &#039;chained LOBs&#039; in Table E under [[FILEORG parameter|FILEORG]] x&#039;100&#039; files has a number of advantages over the way LOBs are stored and accessed in non x&#039;100&#039; files.&amp;lt;/p&amp;gt;&lt;br /&gt;
*because the LOBs no longer need to be contiguous, space monitoring is simpler and files are less likely to fill up.&lt;br /&gt;
*fields may be defined so that &#039;small&#039; entries may be stored &#039;locally&#039; in the record (and so do not use an entire page in Table E)&lt;br /&gt;
&amp;lt;p&amp;gt;*you no longer need to predict the fields may be defined so that &#039;small&#039; entries may be stored &#039;locally&#039; in the record (and so do not use an entire page in Table E)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Storing Large Objects ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When a field is defined as a large object (LOB) ([[#Field Design (File Management) BLOB attribute|BLOB]] or [[#Field Design (File Management) CLOB attribute|CLOB attributes]]) a pointer is stored in the record (in Tables B or X), and, depending on the [[#Field Design (File Management) MINLOBE attribute|MINLOBE attribute]] and length of the value being stored, and the LOB value is stored in its proper place, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Pointer in the record ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When you store a &#039;not null&#039; Large Object value in Table E, a Large Object descriptor is stored in Table B (or X depending on where the field is being ADDed). The descriptor contains the length, and a pointer to the Large Object data in the Table E page and is 27 bytes long.&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the same as non x&#039;100&#039; files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Storing a Large Object ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;When the length of the value being stored is 0 (i.e.: a null string) the action taken depends on the &#039;repeating&#039; type ([[#Field Design (File Management)#AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes|AT-MOST-ONE, REPEATABLE and EXACTLY-ONE attributes]]). This is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Other than null strings, if the value being stored is less than or equal to the [[#Field Design (File Management) MINLOBE attribute|MINLOBE attribute]] for the field, then the value is stored directly in the record (Table B or X). Note that this is in addition to the pointer described above.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the length of the value being stored is greater than the [[#Field Design (File Management) MINLOBE attribute|MINLOBE attribute]] for the field, the value is stored in a series of pages in Table E with the first (up to) 6140 bytes (4 bytes being reserved for the chain pointer) on the first page, the next (up to) 6140 bytes on the &#039;next&#039; page, and so on. These pages are not, necessarily, contiguous. Any pages emptied by field or record deletes are first reused, before the pages at [[EHIGHPG parameter|EHIGHPG]] are used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Null Strings and Large Objects ====&lt;br /&gt;
&lt;br /&gt;
Unlike other field types, the [[#Field Design (File Management)#STORE-DEFAULT (SD) and STORE-NULL (SN) attributes|STORE-DEFAULT (SD) and STORE-NULL (SN) attributes]] may not be set on LOB fields. This results in such fields having the equivalent to the LITeral option. The following table illustrates the results when null strings are stored in Large Object fields:        &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;;style=&amp;quot;width=&amp;quot;90%&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | Explicit Null &amp;lt;br/&amp;gt; &#039;&#039;fieldname&#039;&#039; = &#039; &#039;&lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | Implicit Null &amp;lt;br/&amp;gt; &#039;&#039;fieldname&#039;&#039; = %X (where %X is null) &lt;br /&gt;
! align=&amp;quot;center&amp;quot; scope=&amp;quot;col&amp;quot; | No reference in code &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| EXACTLY-ONE&lt;br /&gt;
| (Note 1)  &lt;br /&gt;
| (Note 1)&lt;br /&gt;
| (Note 1)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| AT-MOST-ONE &lt;br /&gt;
| field stored with null value  &lt;br /&gt;
| not present&lt;br /&gt;
| not present&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| REPEATABLE&lt;br /&gt;
| field stored with null value  &lt;br /&gt;
| not present&lt;br /&gt;
| not present&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note 1: the field will always act as if it is physically present (and return a null). However, exactly one fields react a bit differently depending on whether they are inside a Repeating Field Group (RFG) or not. Inside an RFG, all three operations will result in a field being present (as displayed in a PAI). Outside of RFGs, (and remembering that only the CHANGE statement may be used on exactly one fields) only the &#039;CHANGE &#039;&#039;fieldname&#039;&#039; TO %X&#039; syntax will physically create an occurrence on the record.&lt;br /&gt;
&lt;br /&gt;
==The following Parameters and Commands relate to the Use of Table E==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Pages are either used or not in Table E, so there is no formula to determine whether a page is added to the reuse queue (unlike Tables B and X). Because of this, there are no EREUSE, EREUSED, or EQLEN parameters. The size of the reuse queue can always be determined by the difference between EHIGHPG and EPGSUSED.&lt;br /&gt;
{|&lt;br /&gt;
|[[EHIGHPG parameter]]&lt;br /&gt;
|The highest active Table E page. (The first page in Table E is page zero.)&lt;br /&gt;
|-&lt;br /&gt;
|[[EPGSUSED parameter]]&lt;br /&gt;
|The number of Table E pages currently in use.&lt;br /&gt;
|-&lt;br /&gt;
|[[ESIZE parameter]]&lt;br /&gt;
|The number of pages in Table E&lt;br /&gt;
|-&lt;br /&gt;
|[[FILEORG parameter]]&lt;br /&gt;
|The file organisation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59423</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59423"/>
		<updated>2013-05-07T22:15:47Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Computing Table E size - ESIZE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of either the full logical records-a base record, plus extension(s) (that contain the values of all VISIBLE fields), or if Table X is enabled, the visible fields in the base record. This section discusses Table B by itself, and the Table X impact  is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Either way, to size the data are correctly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Creating a file with a Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Dividing data between Table B and X===&lt;br /&gt;
&amp;lt;p&amp;gt;Obviously:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no one formula for determining a unique BSIZE or XSIZE, but there are a number of approaches you may take. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records with a generally consistent size you may be able to keep most of your data in Table B and have only a small Table X for the occasional overflow.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have wildly divergent size records, size Table B so that the vast majority of the smaller size records fit in Table B so only the largest ones create extensions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records which start small, and then increase dramatically over time, consider very small (perhaps even only large enough to handle the preallocated fields) in Table B, with the rest as extensions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, as long as you understand first the overall size you would need if you were only storing the data in Table B, splitting it into the two parts is straightforward (and if [[RECRDOPT parameter|RECRDOPT]] is set to one, then sizing of Table B is trivial (how many records do you expect to have?).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The sizing of Table E varies depending on whether the FILEORG parameter|FILEORG x&#039;100&#039; bit is set:(&amp;lt;/p)&lt;br /&gt;
&lt;br /&gt;
==== For FILEORG parameter|FILEORG x&#039;100&#039; files ====&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, divide by 6140 (The usable page size of 6144 less the 4 byte chain pointer) and round up. Then, multiply by the total number of Large Object fields (and probably add a percentage for growth (based on your knowledge of the data and application).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Additional considerations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have [[#Field Design (File Management)# BLOB, CLOB and MINLOBE attributes|MINLOBE]] set, ignore large objects smaller than this number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Be sure to take that (along with the large object header) into account when sizing Tables B and X.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E FILEORG x&#039;100&#039; (File Architecture)|Table E for FILEORG X&#039;100&#039;]] files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== For non FILEORG parameter|FILEORG x&#039;100&#039; files ====&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For more detail on the large object architecture, see [[Table E non x&#039;100&#039; (File Architecture)|Table E for non FILEORG X&#039;100&#039; files]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59422</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59422"/>
		<updated>2013-05-07T21:56:25Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Sizing Table B */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of either the full logical records-a base record, plus extension(s) (that contain the values of all VISIBLE fields), or if Table X is enabled, the visible fields in the base record. This section discusses Table B by itself, and the Table X impact  is discussed in the next section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Either way, to size the data are correctly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Creating a file with a Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Dividing data between Table B and X===&lt;br /&gt;
&amp;lt;p&amp;gt;Obviously:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no one formula for determining a unique BSIZE or XSIZE, but there are a number of approaches you may take. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records with a generally consistent size you may be able to keep most of your data in Table B and have only a small Table X for the occasional overflow.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have wildly divergent size records, size Table B so that the vast majority of the smaller size records fit in Table B so only the largest ones create extensions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records which start small, and then increase dramatically over time, consider very small (perhaps even only large enough to handle the preallocated fields) in Table B, with the rest as extensions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, as long as you understand first the overall size you would need if you were only storing the data in Table B, splitting it into the two parts is straightforward (and if [[RECRDOPT parameter|RECRDOPT]] is set to one, then sizing of Table B is trivial (how many records do you expect to have?).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;b&amp;gt;Formula for sizing the ESIZE parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59421</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59421"/>
		<updated>2013-05-07T21:51:44Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Sizing Tables B and X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of the logical records-a base record, plus extension(s) is a logical record-that contain the values of all VISIBLE fields. To set Table B parameters properly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Creating a file with a Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Dividing data between Table B and X===&lt;br /&gt;
&amp;lt;p&amp;gt;Obviously:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no one formula for determining a unique BSIZE or XSIZE, but there are a number of approaches you may take. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records with a generally consistent size you may be able to keep most of your data in Table B and have only a small Table X for the occasional overflow.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have wildly divergent size records, size Table B so that the vast majority of the smaller size records fit in Table B so only the largest ones create extensions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have records which start small, and then increase dramatically over time, consider very small (perhaps even only large enough to handle the preallocated fields) in Table B, with the rest as extensions.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;But, as long as you understand first the overall size you would need if you were only storing the data in Table B, splitting it into the two parts is straightforward (and if [[RECRDOPT parameter|RECRDOPT]] is set to one, then sizing of Table B is trivial (how many records do you expect to have?).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;b&amp;gt;Formula for sizing the ESIZE parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59420</id>
		<title>Record (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Record_(File_architecture)&amp;diff=59420"/>
		<updated>2013-05-07T21:38:47Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A Model 204 Record is a collection of fields (either individually; in Repeating Field Groups (RFGs); or any mixture of these) containing a set of data about a thing. Admittedly, this is a very vague description, because the flexibility of Model 204 permits the File Manager to create files whose records are best suited to the required purpose, whatever it may be.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each record is variable in length and need contain only the fields (some or all of those contained in the [[#Table A (File Architecture) Internal File Dictionary|Internal File Dictionary in Table A]]) that pertain to it. The limit of the number of field value pairs in a record is in the tens of millions.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There is only a limited fixed format for data within a record (pre-allocated fields). Almost any number of fields can appear almost any number of times in almost any order. Each record is automatically assigned a unique internal record number that is used by the system to build index entries for the record.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example, the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&lt;br /&gt;
IN &#039;&#039;filename&#039;&#039; STORE RECORD&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Does, in fact, physically store a record. It has been assigned an [[#Internal Record Number|Internal Record Number]] and would contain the pre-allocated field structure (if any), but no data.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Records. Base Records and Extension Records ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The term &#039;record&#039; is actually used three ways: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the record as a full collection of all of the data about a &#039;thing&#039;&lt;br /&gt;
* base records: the initial portion of that data&lt;br /&gt;
* extension records: a (possible) string of additional portions of the data    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These are discussed below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== the Record as a  container ===&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Base Records&amp;quot;&amp;gt;Base Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Extension Records&amp;quot;&amp;gt;Extension Records&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;The Internal Record Number (IRN)&amp;lt;/div&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The internal record number (IRN) is the base record number (or slot) assigned when the record is first stored. While, once assigned, it can be passed around inside a program as an easy way to refer back to the set of data (see the [[FOR RECORD NUMBER statement]]) it is not a permanent identifier: when the file is reorganized the position where a record is reloaded may be quite different than where it was before. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The IRN (represented by a single bit) is used as a target for Model 204 indexing (both hashed and B-tree indexing). See [[Bit Maps (File Architecture)|Bit Maps]] for more information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Structure of a Model 204 Record ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As shown in [[Table B (File Architecture)|Table B]], Model 204 records grow from the end toward the beginning of the page it is stored upon. So, a proper representation of the record shows it as:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::[[File:Record Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In any discussion of the record, the &#039;beginning&#039; of the record is to the left, and the growth (represented by the blue arrow) is toward the right.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Pointer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Every &#039;portion&#039; of every Model 204 record (base or one of perhaps many extensions) begins with an extension record pointer.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X, this pointer is 3 bytes in length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For files with [[Table X (File Architecture)|Table X]] enables, this pointer is 4 bytes in length (to handle the larger number of slots in Table X).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Regardless of the length, this pointer links this portion of the record to its next portion. Where that location is, of course, dependent on whether Table X is enabled.&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If there are any preallocated fields in a file (see the [[OCCURS attribute]]) every record in that file will begin with the set of such fields, immediately after the extension pointer. The structure of the fields is held in [[#Table D (File Architecture) Record Map|the Record Map in Table D]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note: For the Sort or Hash key (for such files), if it is preallocated (and it should be unless it is wildly variable in size) it will be the first field in the record map. If it is not preallocated, it will be the first &#039;field value pair&#039; in the record.&amp;lt;/p&amp;gt;            &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;After the preallocated fields, is the rest of the data; a series of: field value pairs; repeating field groups; and / or pointers to large objects. These will be physically positioned in: either the order they were [[ADD statement|ADD]]ed (which always adds the entity at the end of the record); or positioned by an [[INSERT statement]]. Hence, the application code controls the relative order of the data in the record, once past the preallocated fields.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Each of the four is briefly described below, but refer to the specific topic for each for further detail:&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
==== [[Preallocated Fields (File Architecture)|Preallocated Fields]] ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Field Value Pairs (File Architecture)|Field Value Pairs]] ====&lt;br /&gt;
&lt;br /&gt;
Field Value Pairs, or, perhaps more precisely, &#039;&#039;Field Name &#039;Equals&#039; Value Pairs&#039;&#039; are the most common way data is held in a Model 204 Record. (Even the Repeating Field Group structure is a set of Field Value Pairs which occur in tandem).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== [[Repeating Field Groups (File Architecture|Repeating Field Groups]] ====&lt;br /&gt;
&lt;br /&gt;
==== Large Objects ====&lt;br /&gt;
&lt;br /&gt;
===== [[BLOBs and CLOBs (File Architecture|Native Large Objects]] =====&lt;br /&gt;
&lt;br /&gt;
===== Large Objects Without Table E =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If [[Table E (File Architecture)|Table E]] is not enabled, and the File Manager still wishes to store data which is more than 255 bytes long, it must be done by the application code. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The technique is to store the data as a series of repeating fields, each containing (up to) 255 bytes. The  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59419</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59419"/>
		<updated>2013-05-07T21:29:26Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Creating a file with a Table X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of the logical records-a base record, plus extension(s) is a logical record-that contain the values of all VISIBLE fields. To set Table B parameters properly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Table B overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X each Table B record has five bytes of overhead made up of a 3-byte extension pointer and a 2-byte slot number. For files with XSIZE greater than 0, each Table B record has six bytes of overhead made up of a 4-byte extension number and a 2-byte slot number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no formula for determining a unique BSIZE or XSIZE. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;b&amp;gt;Formula for sizing the ESIZE parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_sizing_introduction&amp;diff=59416</id>
		<title>File sizing introduction</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_sizing_introduction&amp;diff=59416"/>
		<updated>2013-05-07T01:30:18Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview - Two approaches to File Sizing==&lt;br /&gt;
&amp;lt;p&amp;gt;After designing the data structures you are implementing (see [[Field Design (File Architecture)|field]] [[and Repeating Field Group Design (File Management|Repeating Field Group design]]) there are two ways for a file manager to approach the calculation of file sizes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You can take the ad-hoc approach:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* make size estimates and then iteratively load a sampling of records to verify &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;or, you can do a detailed analysis of the data you expect the file &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Either way, there are certain decisions, notably the number of datasets, which need to be done based on the amount of data you will, eventually have to handle.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[File Size Calculation in Detail]]&lt;br /&gt;
   (and feildgroup) choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;When designing a file, consider starting out with a test file of only a few hundred records. This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of the logical records-a base record, plus extension(s) is a logical record-that contain the values of all VISIBLE fields. To set Table B parameters properly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Table B overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X each Table B record has five bytes of overhead made up of a 3-byte extension pointer and a 2-byte slot number. For files with XSIZE greater than 0, each Table B record has six bytes of overhead made up of a 4-byte extension number and a 2-byte slot number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no formula for determining a unique BSIZE or XSIZE. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;b&amp;gt;Formula for sizing the ESIZE parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Creating a file with a Table X==&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59415</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59415"/>
		<updated>2013-05-07T01:26:42Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;Trying to do a precise file size for a Model 204 file is difficult because:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The flexibility of Model 204 makes the knowledge of the detail needed unlikely&lt;br /&gt;
&lt;br /&gt;
* During the application design process, it is highly likely that the data structures and field attributes will change, thus making &lt;br /&gt;
&lt;br /&gt;
* Model 204 performs so well that there is no advantage to having such precise sizes &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Rocket Software recommends a more flexible, ad-hoc approach, as discussed in [[File Size Calculation]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;What follows is detail which is unlikely ever to be done more than once by a file manager. That said, the detail provided is useful and may be referred to to help in the ad-hoc design approach.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Detailed Design Process== &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;After choosing the fields and field attributes for a file, you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;The detail of the process still necessitates that the final sizing be validated. You should still load a representative sample of your records into a test file (and, for larger files, at least one segment&#039;s worth). This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of the logical records-a base record, plus extension(s) is a logical record-that contain the values of all VISIBLE fields. To set Table B parameters properly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Table B overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X each Table B record has five bytes of overhead made up of a 3-byte extension pointer and a 2-byte slot number. For files with XSIZE greater than 0, each Table B record has six bytes of overhead made up of a 4-byte extension number and a 2-byte slot number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no formula for determining a unique BSIZE or XSIZE. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;b&amp;gt;Formula for sizing the ESIZE parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Creating a file with a Table X==&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59414</id>
		<title>File size calculation in detail</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_size_calculation_in_detail&amp;diff=59414"/>
		<updated>2013-05-07T01:14:55Z</updated>

		<summary type="html">&lt;p&gt;Rob: Created page with &amp;quot;you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is crea...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;you need to calculate how much disk space the file requires and then to allocate the space. After being calculated, the values of file parameters are set when the file is created. Before you can calculate the space, you need to know:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Types of fields in the input data for the file (such as ORDERED or FRV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields that the average record contains&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records you expect to be in file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use this information to calculate the file parameters, and then use the file parameters to calculate the expected disk space.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter contains:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Detailed instructions to help you calculate the file parameters and disk space&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Information about allocating disk space for your operating system &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Complete space estimation example using the steps shown in the first section of this chapter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Space calculation and file parameter worksheets to help you calculate file sizes for your data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This chapter shows you how to find the total number of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages you need for a file, that is, to resolve the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of pages = ASIZE + BSIZE + CSIZE + DSIZE +&lt;br /&gt;
                  ESIZE + XSIZE + 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Dictionary/204 File Management facility can automatically calculate file spacing allocations, as described in [[ Managing File and Table Size with FILEMGMT#File sizing overview|File sizing overview]] .&amp;lt;/p&amp;gt;&lt;br /&gt;
===Testing your file design===&lt;br /&gt;
&amp;lt;p&amp;gt;When designing a file, consider starting out with a test file of only a few hundred records. This allows you to test the accuracy of space calculations and parameter settings before loading the entire file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Using constants===&lt;br /&gt;
&amp;lt;p&amp;gt;Many of the formulas used to calculate parameters contain a constant (for example, 1.1 in the formula for ATRPG) multiplied by an expression. The constants generally allow for inaccuracies in knowledge about data in the file and for file expansion. If you know in advance what values are going to be stored, and that the amount of data in the file will remain static, you can reduce the multipliers (to a minimum value of 1).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Model 204 usable page size constant&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The standard &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; page size is 6184 bytes. Although &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has accepted other page sizes in previous releases (to accommodate hardware no longer supported by IBM), the 6184-byte size is currently the only valid page size. Therefore, the calculation for usable page size is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6184 - 40 = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table A==&lt;br /&gt;
&amp;lt;p&amp;gt;Table A is an internal file dictionary in which character strings and their corresponding codes are recorded. Table A contains the following information:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This section&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...   &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field names of all fields in the file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields with the FEW-VALUED field attribute, and either the CODED attribute or the FRV (for-each-value) attribute. Values for fields that have both the CODED and FRV attributes appear only once, as do values used for more than one field.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Character string values of all fields that have the MANY-VALUED attribute and either the CODED attribute or the FRV attribute.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table A parameters you need as part of the total &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; number of pages are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies the number of Table A...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ATRPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Attribute pages &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FEW-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MVFPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MANY-VALUED pages&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE, the total size of Table A, is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After it has been allocated, Table A cannot be expanded. However, because Table A is always small in relation to the rest of the file, be generous when allocating space.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ASTRPPG (character strings per Table A page)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can compute the Table A parameters, you need to know ASTRPPG, which is the number of character strings per Table A page. First, estimate the average length (L) of all character strings you will store in Table A. After you compute L, you can compute ASTRPPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing L (the length of each string)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In computing L, the length of each string must include system overhead. Increase the basic character string lengths using the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or FRV value, add 3 bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field name, regardless of attributes, add 2 bytes. In addition:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field has any of the following attributes, add 1 more byte: OCCURS, LEVEL, FLOAT, UPDATE IN PLACE, or ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is OCCURS, add 2 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is LEVEL, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is FLOAT, add 1 more byte.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is ORDERED, add 4 more bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is UNIQUE, add 1 more byte. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the field is NUMERIC RANGE, it requires a number of auxiliary field names. For each NUM RANGE field, add: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((4 + field_name_length) * (# of digits of the longest value + 3)) bytes&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next, examine the data to estimate the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Represents...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or FEW-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or MANY-VALUED CODED values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUM RANGE field + 3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or FEW-VALUED CODED value and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or MANY-VALUED CODED values and value overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then, compute L, where:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing ASTRPPG (character strings per Table A page)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;After you have estimated the length of the average character string for this file, you can compute ASTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of ASTRPPG is 400, which corresponds to an average string length plus overhead of 15 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing ATRPG (the number of attribute pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG specifies the number of pages to be assigned to the attribute section of Table A. Compute ATRPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields (as computed above for ASTRPPG)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Next, compute the following equations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (N / 6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&lt;br /&gt;
ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for ATRPG.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ATRPG has a default value of 1 (its minimum value), which allows as many as 400 field names when the default value of ASTRPPG (400) is also used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ATRPG multiplier&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The multiplier of 1.1 in the ATRPG formula allows room for adding field names that were not originally part of the file, as well as for redefining field names. When the REDEFINE command is used, one or two bytes can be added to or deleted from a Table A entry, if the LEVEL or UPDATE option is changed. The amount of overhead required for a redefined field is computed according to the rules for the original definition (see ASTRPPG above). When you delete a field definition, all but two bytes are made available for reuse. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If you are sure that field names will not be added to a file, you can use a multiplier closer to 1. The size of the multiplier is important if ATRPG comes out to be just over one page. A one-page attribute section of Table A provides much better performance than a multiple-page section. This performance difference can be seen in the amount of disk I/O required to compile a User Language request or Host Language Interface call that refers to many fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The product of ATRPG and ASTRPPG must not exceed 4000.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing FVFPG (the number of FEW-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;FVFPG specifies the number of pages to be assigned to the FEW-VALUED section of Table A. The number of FEW-VALUED pages depends upon the total number of distinct values to be taken on by the various FEW-VALUED fields that are either CODED or FRV. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by FEW-VALUED fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED values (as computed for ASTRPPG).   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
FVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for FVFPG. FVFPG must not exceed 65,535. FVFPG has a default value of 1, which is its minimum value. Even if the file has no FEW-VALUED fields, set FVFPG to 1 to avoid error conditions caused by incorrect or unforeseen field definitions in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Like the attribute section of Table A, the FEW-VALUED section is most effective when it is very small. The value sections of Table A are accessed most heavily by retrieving or updating CODED fields. CODED fields are retrieved as a result of User Language PRINT and arithmetic statements or IFGET calls. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Keeping FVFPG small&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If FVFPG is larger than two pages, you might want to reevaluate the choice of FEW-VALUED fields to reduce the number of distinct values. If you cannot reduce the number of distinct values, try to redesign the FEW- and MANY-VALUED sections of Table A so that one of the sections is one page, if possible. Sometimes moving a field from one section to the other can reduce the size of one section to less than a page. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing MVFPG (the number of MANY-VALUED pages)===&lt;br /&gt;
&amp;lt;p&amp;gt;MVFPG specifies the number of pages to be assigned to the MANY-VALUED section of Table A. The number of MANY-VALUED pages depends upon the total number of distinct values to be taken on by the various MANY-VALUED fields that are either CODED or FRV.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Examine your data to estimate the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total amount of space consumed by MANY-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED values (as computed for ASTRPPG)   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&lt;br /&gt;
MVFPG = 1.2 * B / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer and use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;larger&amp;lt;/var&amp;gt; of the two numbers for MVFPG. MVFPG must not exceed 65,535. MVFPG has a default value of 1, which is its minimum value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed in the preceding description of FVFPG, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the best performance when either the FEW-VALUED or MANY-VALUED section of Table A is small. If both MVFPG and FVFPG are larger than two pages, place most of the fields in one of the sections or the other so that either the FEW-VALUED section or the MANY-VALUED section is one page.&amp;lt;/p&amp;gt;&lt;br /&gt;
===ASIZE (Table A size)===&lt;br /&gt;
&amp;lt;p&amp;gt;ASIZE is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and is the sum of the ATRPG, MVFPG, and FVFPG parameters. Because each of these parameters has a default value of 1, the default value of ASIZE is 3.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table B==&lt;br /&gt;
&amp;lt;p&amp;gt;Table B consists of the logical records-a base record, plus extension(s) is a logical record-that contain the values of all VISIBLE fields. To set Table B parameters properly, you need a good idea of what an average record will look like after all of the data has been loaded. More precisely, you need to know, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;for each record type in the file&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of fields in the average record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When calculating Table B space, remember that some fields can be missing entirely in some records and can occur more than once in others. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To calculate the total disk space you need for a file, you need to know the size of Table B: the BSIZE parameter. To calculate BSIZE, you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BRECPPG&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of records per Table B page&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Instructions for calculating these parameters are discussed in this section.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating space for hash key files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The method for calculating Table B space is the same for all file organizations. Because Table B cannot be expanded in a hash key file, Table B calculations for hash key files must be based on the total number of records that the file will ultimately contain. The final count of records is less critical for ordinary and sorted Table B organizations. Refer to the chapters on sorted and hash key files, [[ Sorted Files#Sorted Files|Sorted Files]] and [[ Hash Key Files#Hash Key Files|Hash Key Files]], respectively, for the settings of the FILEORG, BPGPMSTR, BPGPOVFL, and BEXTOVFL parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Achieving the best performance&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; achieves the fullest use of Table B space when different record types are uniformly distributed on each Table B page. Uniformly distributing record types also increases retrieval speed when related records of different types are processed together.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Storing records on Table B pages===&lt;br /&gt;
&amp;lt;p&amp;gt;The following conditions must be met before a new record is stored on a Table B page:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record number must be available. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic record overhead must be available without using any reserved space. In a sorted or hash key file, the sort or hash key, unless it is preallocated, must also fit without using the reserved space.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If any fields are preallocated, the space for all such fields must be available on the page. Preallocated fields can extend into reserved space.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing R (the average record size)===&lt;br /&gt;
&amp;lt;p&amp;gt;Before calculating BSIZE, you need to compute &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, the Table B space required for the average record, according to these rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start with five bytes of basic overhead for the record (or eight bytes for overflow records in sorted files).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ignore any field that has the INVISIBLE attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for non-preallocated fields (fields that do &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; have an OCCURS clause) as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each compressible occurrence of each BINARY field, add six bytes. Leading zeros or nonnumeric characters override the compress option.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each CODED field, add six bytes.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each NON-CODED field, add three bytes plus the average length of the values of that field. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of each FLOAT field, add two bytes plus the defined LENGTH for the values of that field.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Compute the space needed for preallocated fields as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each CODED or BINARY field, add (4 * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each field defined with the LENGTH option (including FLOAT fields), add (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; * &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;) bytes, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the length and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the number of occurrences. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 30 bytes for each occurrence of a non-preallocated BLOB or CLOB field descriptor. If the BLOB or CLOB field is preallocated, add 27 bytes for each occurrence of a BLOB or CLOB field descriptor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of bytes used by all preallocated fields in one record must be less than the page size and must leave space on the page for the basic record overhead.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRECPPG (the number of records per Table B page)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG specifies the maximum number of logical records that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store on one Table B page. Compute BRECPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRECPPG = 1.1 * (6144 - 4) / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BRECPPG has a default value of 256, which corresponds to an average record length of 26 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Calculating BRECPPG accurately is important, because it can affect the way storage is utilized in Tables B, C, and D, which in turn affects efficient &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; operation. If you estimate that fewer records fit on a page than actually do fit, you might waste a great deal of storage space (although the resulting unused space per page allows you to add new fields to existing records and, in hash key and unordered files, to create new records).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;By estimating that more records fit than actually do fit, performance can be adversely affected in two ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One or more extension records per page might be created. Extension records are described on [[#Computing BRESERVE (reserved Table B space)|Computing BRESERVE (reserved Table B space)]], the other parameter that affects their creation.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record numbers might be wasted. Record numbers are assigned sequentially, starting with 0 for the first record on the first page of Table B. Each page has BRECPPG numbers allocated to it. If fewer than BRECPPG records actually fit on the page, the extra record numbers are wasted. &lt;br /&gt;
&amp;lt;p&amp;gt;Wasted record numbers do not take space in Table B, but in certain cases they can affect inverted retrieval speeds and the sizes of Tables C and D. Wasted record numbers are a concern if they cause you to increase the size of the file size multiplier, described on [[#Tables C and D indexing structure|Tables C and D indexing structure]]. For small files (under 50,000 records), wasted record numbers have no effect. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Computing BSIZE (Table B size)===&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE specifies the number of pages to be assigned to Table B. Compute BSIZE using the following equation: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE = 1.2 * Total-Number-of-Records / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. You can change the value of BSIZE (except in a hash key file) with the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE has a default value of 5, which corresponds to 1280 record slots if the BRECPPG default is taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;BSIZE cannot exceed 16,777,216, nor can the product of BRECPPG and BSIZE exceed 16,777,216, the maximum number of record slots. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing BRESERVE (reserved Table B space)===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE reserves a number of bytes on each Table B page for the expansion of records on that page. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allows you to add fields to records virtually without limit. Reserved space is used for new fields, if it is available on the page. Otherwise, an extension record is created in the next available space in Table B. Thus, records are infinitely expandable, subject only to Table B space limitations (BSIZE). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, suppose that an estimated six records fit on a 6144-byte page and reserved space is 17 bytes. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; has loaded five records that are each 1200 bytes long, it begins a sixth record on the same page because the amount of space left (144 bytes) is greater than the reserved space. Only the first few fields of the sixth record fit on the page. The extra fields are placed on another page in an extension record, which uses up another record number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;While extension records are transparent to the user, access to the fields in extensions can be much less efficient than access to fields contained in the basic portions of records. To avoid extension records during initial file loading, set BRESERVE to the average record length (&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;). That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If, in the example above, you set reserved space to 1200, only five records are placed on the page. The fifth record begins with 1344 bytes remaining on the page. Fields are added, crossing the reserved space boundary, until the record is complete. The sixth record then begins on a new page, avoiding an extension record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Sizing BRESERVE to avoid extension records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If all the records in the file are less than about 1000 bytes, set BRESERVE to the average record length. If you set BRESERVE to the maximum record length (and at least one complete record fits on each Table B page), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not build extension records unless new fields are added or inserted, or variable-length fields are changed to be longer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files in which you initially load skeleton records and add the bulk of the fields later, set BRESERVE to a value much higher than the average record length. You can reset BRESERVE after some or all of the records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Too many extension records can have a serious negative impact on performance. However, for very large records, or for files in which the size of records varies dramatically, you might need to have some extension records and set BRESERVE to a smaller value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of BRESERVE is 17, which can be changed any time when the file is not being updated by another user.   &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Tables B and X==&lt;br /&gt;
===Preallocated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;Preallocated fields may reside only in Table B records. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will never store them in Table X. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will store non-preallocated fields in Table B records. However, when a given Table B record has no more room for additional non-preallocated fields, those fields will be stored in Table X extension records. The fields stored in Table X records have exactly the same format and therefore space requirements as fields stored in Table B records.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Table B overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;For files without a Table X each Table B record has five bytes of overhead made up of a 3-byte extension pointer and a 2-byte slot number. For files with XSIZE greater than 0, each Table B record has six bytes of overhead made up of a 4-byte extension number and a 2-byte slot number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is set to 0, Table B must be sized such that it can contain all visible fields in all records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When XSIZE is greater than 0, the total size of Table B and Table X must be such that each visible field in all records will be stored in Table B or Table X. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are many possible combinations of BSIZE and XSIZE that meet this requirement. So, for a file with a Table X, there is no formula for determining a unique BSIZE or XSIZE. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Table X overhead===&lt;br /&gt;
&amp;lt;p&amp;gt;The purpose of Table X is to free page slots in Table B that might have been used for extension records. There may be a performance side effect with using Table X. By experimenting with different values of XRECPPG, it may be possible to reduce the size of record extension chains-that is, have fewer but larger extension records instead of many smaller extension records. This would potentially reduce I/O required to read in very large records, such as those with many extensions.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing tables with XSIZE greater than zero===&lt;br /&gt;
&amp;lt;p&amp;gt;Setting a default for XSIZE depends on the difference in the size of your records. The more variation in the length of your records, the more likely that you will have extension records and, therefore, need more Table X pages. Rocket Software recommends the following: if the size of your records varies by 10%, then allocate 10% of the pages in Table B for Table X.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XSIZE is greater than 0, the following formula can be used to size Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BSIZE=1.2 *(total number of base records) / BRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And the following formula can be used to size Table X:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;XSIZE=1.2 *(total number of extension records) / XRECPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Table X slots are always reused after extension records are deleted. Table B slots are reused only for Reuse Record Number (RRN) files.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Tables C and D indexing structure==&lt;br /&gt;
&amp;lt;p&amp;gt;Tables C and D comprise the indexing structure of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Only fields defined with the KEY, NUMERIC RANGE, or ORDERED attribute generate entries within the indexing structure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Entries in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Are made for each distinct value of...     &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY or NUMERIC RANGE field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Table D&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED field, and for each record that contains a particular value of a KEY, NUMERIC RANGE, or ORDERED field, if that value occurs in more than one record in the file. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The two indexes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Hashed Index&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Composed of Table C, which indexes KEY and NUMERIC RANGE fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Table C entries.&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Stored in Table D, is composed of the Ordered Index B-tree, which indexes ORDERED fields, plus a secondary index (located in Table D) containing Table B record numbers pointed to by Btree entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;In addition to these tables, some free space might be available to the file on unassigned pages in a free-space pool.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FRV attribute entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In addition, Tables C and D contain extra entries for fields that have the FRV attribute. However, the space for these entries generally is insignificant in relation to the other entries, and so formulas for calculating FRV entries are not provided. To allow for FRV entries and to compensate for imprecise knowledge of data values and their distribution, the following formulas result in generous space estimates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the file size multiplier (N)===&lt;br /&gt;
&amp;lt;p&amp;gt;To minimize disk storage space and to optimize record retrieval techniques, the records in Table B are divided into internal file segments that are transparent to the user. The maximum number of records stored in one file segment is 49,152-that is, eight times a page size of 6184).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both Table C and Table D space estimation formulas depend upon the file size multiplier &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, which represents the number of internal file segments. Use the following equation to calculate &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = Number-of-Records-in-the-File / 8 * Page-size&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round the result up to an integer. If BRECPPG is set too high or if a large number of extension records exists, there can be fewer actual records per segment. In this case, base &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; on the number of record numbers used in the file (EXTNADD + MSTRADD), rather than on the number of records actually stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For space estimation purposes, the records are considered to be distributed evenly among the segments. If the records are not distributed evenly, make separate estimates for each segment individually.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing Table C==&lt;br /&gt;
===Table C organization===&lt;br /&gt;
&amp;lt;p&amp;gt;Table C is a hashed table divided into entries of seven bytes each. Table C entries store index information for fields that have the KEY or the NUMERIC RANGE attributes. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; creates a chain of entries in Table C for each value stored in a KEY field and several chains of entries for each value stored in a NUMERIC RANGE field.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table C property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The head of each chain is called the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;property entry&amp;lt;/var&amp;gt;. The property entry identifies the field name = value pair that is indexed by the other entries in the chain. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places one entry in the chain for each segment of the file containing records that have the field name = value pair identified in the property entry.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, PROJECT, a 4-segment file, contains a field named STAGE. STAGE is defined with the KEY attribute. One of the values stored in the field STAGE is PLANNING. In the first and second segments of the PROJECT file, there are records containing the field name = value pair, STAGE = PLANNING.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Therefore, in Table C of the PROJECT file, there is a chain of three entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Property entry for STAGE = PLANNING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the first segment of the PROJECT file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entry for the second segment of the PROJECT file &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing segment and property entries&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to store segment entries on the same page as the property entry. When this is not possible, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; continues chains of entries in Table C across Table C page boundaries, ensuring uniform use of the pages in Table C by reducing the likelihood of one page filling while other pages are relatively empty.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing CSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter specifies the number of pages to be assigned to Table C. After it has been allocated, the size of Table C cannot change until you re-create the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute CSIZE as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the distinct values of each KEY or NUMERIC RANGE field into one of two categories:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u &amp;lt;/var&amp;gt;contains those field name = value pairs that usually appear in only one record in the file, such as Social Security number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; contains those field name = value pairs that occur in more than one record in the file, such as the values of SEX or AGE. For simplicity, field name = value pairs in this category are assumed to occur in records in every segment. This is the worst-case assumption and results in slightly high estimates. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then let &amp;lt;var&amp;gt;Vu&amp;lt;/var&amp;gt; = total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;u&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;= total number of pairs in category &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;.   &lt;br /&gt;
&amp;lt;p&amp;gt;For fields that have both the KEY and NUMERIC RANGE attributes, count the values twice, as if there were two distinct fields. Calculate the number of extra entries required for NUMERIC RANGE retrieval fields. For each NUMERIC RANGE field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Let &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; = total number of extra entries required for all NUMERIC RANGE retrieval fields. &lt;br /&gt;
&amp;lt;p&amp;gt;When calculated this way, &amp;lt;var&amp;gt;Vr &amp;lt;/var&amp;gt;is the maximum number of extra entries required. You can reduce this number slightly if some digits never take on all the values between 0 and 9. For example, in a 3-digit age field, the first digit never goes above 1. Refining the estimate of &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually unimportant because &amp;lt;var&amp;gt;Vr&amp;lt;/var&amp;gt; is usually outweighed by &amp;lt;var&amp;gt;Vn&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)(VN + VX)) / (6144 -4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. Do not reduce the multiplier, even if you can determine the exact number of entries required in Table C, because it is not possible to use all the space available. CSIZE must not exceed 16,777,216. CSIZE has a default value of 1.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Sizing Table D==&lt;br /&gt;
===Table D data===&lt;br /&gt;
&amp;lt;p&amp;gt;Table D contains a number of different types of data. The principal types:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index B-tree pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lists or bit patterns of indexing information for KEY, NUMERIC RANGE, and ORDERED fields that appear in multiple records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Existence bit pattern pages: bit patterns that specify which records currently exist in the file segment&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocated field record descriptions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Text of stored procedures&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Procedure names and aliases (procedure dictionary)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Access Control Table (ACT) pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sorted file group index pages, if the file is a sorted file             &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reserved area: a pool of pages kept available for transaction back out use. The size of the reserved area is controlled by the DPGSRES file parameter.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In most files, indexing entries constitute the major portion of the table, but in files that have very few KEY, NUMERIC RANGE, and ORDERED fields, procedures can overshadow the indexing data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Data storage in Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table B record locating information is stored in Table D record number lists and bit patterns for Ordered Index fields and for KEY and NUMERIC RANGE field name = value pairs that occur in more than one record in the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Record list pages contain &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record numbers for a given file segment, stored in 2-byte entries. Lists that grow too large are converted into bit patterns. Bit pattern pages are &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; pages where each bit on the usable page represents a single record number for a given file segment.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing DSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Ordered Index&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;IT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of index list space&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;F &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of preallocated fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages required for the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;PDSIZE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the procedure dictionary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for the Access Control Table (ACT)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DPGSRES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Size of the Table D reserved area&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space requirements of the principal components of Table D are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;b&amp;gt;About Ordered Index space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Ordered Index is stored in Table D. Record location information is stored on list or bit pattern pages when an ORDERED field value occurs a greater number of times than the IMMED parameter allows to be held locally in a segment of the Ordered Index B-tree. The space requirements for these list pages are the same as for the KEY field lists, and are discussed in detail on [[#Computing the total index list space (IT)|Computing the total index list space (IT)]]. The Ordered Index B-tree space calculations follow.       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following formulas yield an approximation for the total amount of space used by the Ordered Index B-tree structure. The formula variables are field specific; you need to calculate the space for each field in the Ordered Index.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimating Ordered Index space (OI) for each ORDERED field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each field in the file that has the ORDERED attribute, the number of Table D pages required for the section of the Ordered Index B-tree structure that indexes the field is estimated as follows. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the following numbers:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values (or elements) in the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate the average length (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;First estimate the average length of the distinct values stored in the ORDERED field. For numeric values of ORDERED NUMERIC fields, the average length of the numeric values is 8. Compute the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; = estimated av.length of ORDERED values + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Divide the ORDERED values into categories. To estimate space for the Ordered Index, perform separate calculations on each of the following categories of distinct field value:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals values that occurs in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;One and only one record in the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValA  =  the number of values in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;More than one record in the file and in a number of records per segment less than or equal to the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValB = the number of values in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;A greater number of records per segment than the setting of the field&#039;s IMMED parameter. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ValC = the number of values in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each category of distinct values, use the following appropriate formula:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category A&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Total length of the Ordered Index entries placed in category A is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValA&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category B&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the values in category B, first estimate the average number of records per segment that has one of the values in category B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; represent the average number of records per segment with one of the values in category B. &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt; is between 1 and the value of the IMMED parameter for that field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category B is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValB&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 * &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (2 + &amp;lt;var&amp;gt;AB&amp;lt;/var&amp;gt;) + (2 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;)) is greater than 3000, substitute 3000.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate category C&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total length of the Ordered Index entries placed in category C is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;ValC&amp;lt;/var&amp;gt; * (&amp;lt;var&amp;gt;AV&amp;lt;/var&amp;gt; + (5 * &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate OIB&lt;br /&gt;
&amp;lt;p&amp;gt;Assuming that the values of the ORDERED field are distributed evenly over the segments of the file, the estimated total length of all the Ordered Index entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIB = &amp;lt;var&amp;gt;ENa&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENb&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;ENc&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the values are not evenly distributed, estimate ENa, ENb, and ENc (as appropriate) for each segment in which the values occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value calculated as OIB should roughly correspond to the value of the OINBYTES parameter after the file is fully loaded. OINBYTES is a file table parameter that displays the current number of Ordered Index B-tree entry bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Estimating leaf page overhead (LOa)===&lt;br /&gt;
&amp;lt;p&amp;gt;To estimate the actual amount of overhead space on each leaf page, first calculate the amount of overhead expected on each leaf page, then the minimum amount of overhead necessary for each leaf page, and use the larger of the two. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the expected leaf page overhead (LOe)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of overhead expected on each leaf page, &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, depends on the usual mode of updating used when updating the ORDERED field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If most updates are in deferred update mode (using either the deferred update feature or the File Load utility), then use the setting of the field&#039;s LRESERVE parameter to calculate &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you expect most updates to be in non-deferred update mode then use the setting of the field&#039;s SPLITPCT parameter to calculate &amp;lt;var&amp;gt;LOe:&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 *( (100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the minimum leaf page overhead&lt;br /&gt;
&amp;lt;p&amp;gt;To determine the minimum amount of overhead for each leaf page, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;, first calculate the average number of bytes per Ordered Index entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;AE = DIB / NE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then calculate &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt; using the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOmin = 2 * (6144 / AE)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Estimate leaf page overhead (&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;The estimate of the overhead for each leaf page, &amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt;, is the larger of &amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;LOmin:&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LOa&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;LOe&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LOmin&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Estimating the number of required leaf pages (LP)===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of leaf pages required for the ORDERED field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LP = OIB / (6144 - 24 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Round up to the nearest integer. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the size of the index for each ORDERED field===&lt;br /&gt;
&amp;lt;p&amp;gt;The number of Table D pages required for the ORDERED field&#039;s section of the Ordered Index B-tree is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OI = (&amp;lt;var&amp;gt;LP&amp;lt;/var&amp;gt; * 1.01) rounded up to the nearest integer &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This formula assumes conservatively that the number of intermediate pages is 1% of LP. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating the total size of the Ordered Index (OIT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If there is more than one ORDERED field in the file, the total number of pages required for the Ordered Index B-tree is the sum of the pages required for each ORDERED field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OIT = OI1 + OI2 + ... + OIn    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing the total index list space (IT)===&lt;br /&gt;
&amp;lt;p&amp;gt;If a record number list grows to exceed the available space on a Table D list page, but is still less than 30% of the Table D page, the list is moved to a Table D page that has enough space to hold the list. If a list grows longer than 30% of a Table D list page, it is converted into a bit pattern. Bit patterns are not converted back to lists.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deletes empty lists. If a Table D list page becomes empty because the lists originally stored on the page have been deleted, moved onto another page, or converted into bit patterns, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes the empty page available for reuse.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The amount of Table D space used by index lists depends primarily upon how many records contain a particular field name = value pair and how many of those records are in each file segment. Field name = value pairs that were placed in category u for Table C estimates do not take up any space in Table D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DRESERVE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Before you can calculate the index list space, you need to choose a value for the DRESERVE parameter, which is the percentage of space reserved for expansion of current record number lists. If a list grows into the DRESERVE section of the current page for lists, the next new list goes on a new page. If more space becomes available on the current page before a list grows into the DRESERVE section of the page, a new list can be started in the newly available space. New lists cannot start in the DRESERVE section of the Table D page. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of DRESERVE is 15%. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating I (the index list space)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Compute&amp;lt;var&amp;gt; I&amp;lt;/var&amp;gt;, the amount of space required for index lists for each segment, according to the following rules: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the file size multiplier, is greater than 1, consider the total number of records in the file to be divided evenly into segments.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each segment of the file, take each KEY and/or NUMERIC RANGE field name = value pair that occurs in more than one record in the file, and each ORDERED field name = value pair that occurs in a greater number of records than the setting of the field&#039;s IMMED parameter, and place it in one of the following categories:   &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This category&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals. field name = value pairs that occur in...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than one record but fewer than 2 percent of the records in the segment. For files with a page size of 6184 (6144 usable), field name = value pairs in this category occur in fewer than approximately 1000 records in the segment.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; B &amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Two percent or more of the records in the segment. Their record numbers are stored on bit pattern pages. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Fields that have both the KEY and NUMERIC RANGE, or KEY and ORDERED attributes have their values counted twice, as if there were two distinct fields. It is possible that different values of the same field might not be in the same category. For example, if DEPT = PERSONNEL is contained in 5000 records of a segment, it is placed in category B, whereas DEPT = SECURITY might occur in only 100 records in the segment and, therefore, be placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt;. If the distribution of values is not known, then assume that all values of a field occur equally in each segment.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each pair placed in category &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; = 2 + (2 * (Number of Records Containing the Pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt; X&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of bytes available on a Table D page. &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; depends on the DRESERVE parameter, which defaults to 15% and represents the percentage of reserved space per page. The default value of &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; is 5222, calculated as follows.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6144 * (1 - (DRESERVE / 100) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by the category A pairs for the segment, where:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A = T / X&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This value&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equals...&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages required by pairs in category B. Each field name = value pair in category B requires 1 page for the segment. &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; is equal to the number of pairs in the category.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the number of extra values per segment for NUMERIC RANGE fields. For each field:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Determine the maximum number of significant digits the field will have. Include digits on both sides of the decimal point.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiply by 10.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the field appears in fewer than 2% of the records, each extra value just calculated requires the following number of bytes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the NUMERIC RANGE field appears in 2% or more of the segment&#039;s records, the number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039; = number of extra values &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The extra space required for all NUMERIC RANGE fields is computed as follows. First, let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&amp;quot; = sum of all the values of &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt;&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total number of pages required is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C = (T&amp;quot; / X) + B&amp;quot;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, the amount of index list space, &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt;, for each segment is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The total number of pages required for index lists and bit patterns for the entire file is equal to the sum of the totals (&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt;) for each segment, plus the number of existence bit pattern pages. Because there is one existence bit pattern page per file segment, the number of existence bit pattern pages is equal to &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the number of segments. The total number of pages for index lists and bit patterns can thus be represented by the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;A1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;B1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;C1&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;AN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;BN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;CN&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating F (the number of pages for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If any preallocated fields are defined in a file, one Table D page is used to store a record description of the arrangement of fields in the block of storage preallocated in each record. The record description uses 36 bytes of fixed overhead and 8 bytes for each preallocated field. The maximum number of preallocated fields on a 6144-byte record description page is, therefore, 763.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Let &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; be the number of Table D pages required for the record description. &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is always either 0 or 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating P (the number of procedures)===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedures, described in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language Manual, are stored in Table D. In most cases, the text of each procedure requires one page. A very long procedure might require more than one page. Let:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; = total number of procedures&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the procedure dictionary===&lt;br /&gt;
&amp;lt;p&amp;gt;Procedure names and aliases are stored in a procedure dictionary in Table D. Like procedure text, the procedure dictionary associates a procedure name or alias with information about the location of the procedure&#039;s text, and with a class, if the procedure is secured. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; verifies a procedure name, it begins searching on a random page in the first block. If the name is not found on that page, the remaining pages in the same block are searched. If the name is still not found, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; searches the pages in the second block, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Storing new procedure names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not find the name (that is, if this is a new procedure name), it stores the new name in the first block in which it can find space. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; allocates a new block when it cannot find space for a new name in any of the preceding blocks. Space used by deleted names is reused. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing a PDSIZE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;There are two possible paths you can take in choosing a PDSIZE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have one large block containing many pages. Because name searches always begin with the first block, this increases the likelihood of finding a name on the first page read. However, as the pages fill up, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; might allocate a new block when space still exists on the old block.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Have a number of smaller blocks with fewer pages. Although it might take &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; longer to find the procedure name, there is less impact on Table D when a new block is allocated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When choosing PDSIZE, take into account the percentage of procedure and alias names known or anticipated when you design the file. The fewer aliases your site uses, the smaller the PDSIZE you can use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSTRPPG&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG specifies the maximum number of procedure entries per procedure dictionary page. The actual number of procedure entries per page is a function of the length of the names and aliases. The size of an entry is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 34  for a procedure&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; + 7   for an alias &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is the length of the procedure or alias name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;First, estimate &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the average entry size. Then compute PDSTRPPG as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSTRPPG = 6144 / S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The default value of PDSTRPPG is 128. Its maximum is 256.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Computing PDSIZE (the size of the procedure dictionary)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The procedure dictionary is allocated in blocks of one or more contiguous pages. PDSIZE specifies the number of pages in a single block. If you know most of the procedure names when you create the file, use the following formula:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSIZE has a default value of 3.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If &amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; is the number of blocks of pages, then (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) is the total number of pages required for the procedure dictionary.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the access control table (ACT)===&lt;br /&gt;
&amp;lt;p&amp;gt;The access control table (ACT) contains entries that map user classes and procedure classes into privileges. It is used for procedure security purposes. The ACT is allocated from Table D, one page at a time, as needed. No space is allocated until &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; encounters the first SECURE command. The maximum number of pages possible for the ACT is five.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining LET (the total length of procedure class entries)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ACT is organized by user class in ascending order. For each user class, you need to determine:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NPCLASS = number of procedure class subentries&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, compute &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;, the length of the entries for each user class as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt; = 4 + (2 * NPCLASS) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thus, if user class 05 has privilege definitions set for 8 different procedure classes, the length of its entry is 20 bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then, the total length of the user class entries is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;LET&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;LE&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + &amp;lt;var&amp;gt;LEn&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Additional space required for a SECURE command depends upon whether an entry already exists for the particular user class in question, and upon whether subentries exist for the procedure classes in question. If the entry already exists, 2 bytes are needed for each new procedure class mapped to that user class. If the subentries already exist for the procedure classes, no additional space is required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Determining Q (the number of pages required for the ACT)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;Q,&amp;lt;/var&amp;gt; the number of pages required for the ACT is always between 0 and 5 and is calculated by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. To determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will probably use for the ACT: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If there is no room on an ACT page to add a new user class entry or subentry, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reorganizes the entire ACT. During this automatic reorganization, &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; + 1 pages are allocated from Table D, where &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; is the number of pages in the ACT before reorganization. The new pages need not be contiguous. Existing user class entries are redistributed across the new pages in an effort to leave some free space on each ACT page. After reorganizing, the original &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; pages are released.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the ACT reaches five pages and redistributing user class entries does not produce enough space for the new entry, the entry is not added. If the old entries cannot be redistributed successfully in five pages, the ACT is left in its original state and the new entry is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Sizing the reserved area===&lt;br /&gt;
&amp;lt;b&amp;gt;Using reserved Table D pages&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; keeps a specified number of Table D pages available, primarily for transaction back out use. When a page is successfully allocated from this area, the file is marked full; processing continues, and the following warning message is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2486 FILENAME: TABLED FULL. PAGE ALLOCATED FROM TABLED RESERVE AREA&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Marking the file full prevents other users from starting requests that update Table D, making it more likely that all requests in progress complete normally. (Only nonupdate requests can examine data in files marked full. Users attempting to update files marked full are restarted.)    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a transaction back out file, the last half of the reserved section is reserved for use during transaction back out. If an ordinary transaction attempts to get a page from the second half of the reserved area, the allocation attempt fails with a Table D full error, which causes transaction back out to be initiated. During back out any free Table D page can be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For transaction back out files, the DELETE RECORDS and FILE RECORDS statements establish constraints that place the pages they delete during normal processing into the reserved area, temporarily enlarging the second half of the reserved area until the transaction commits.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When no space is available in Table D, including the reserved area, either the request is canceled or the user is restarted. The file is marked broken only if it has been updated and transaction back out is impossible or unsuccessful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The DPGSRES parameter controls the size of the Table D reserved area. To compute DPGSRES, you first need to know the value of &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;, which is the estimate of the value of the total amount of space required for Table D, not including the reserved area space.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DEST (estimated Table D size)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, and the ACT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Setting DPGSRES (the size of the reserved area)&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can reset the DPGSRES parameter and VIEW it as one of the TABLES parameters. It can be set to 0, or any other value up to 32767. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files containing only procedures, set DPGRES to 0 to avoid wasting Table D space. For files that are not transaction back out files, Set DPGRES low to avoid wasting Table D space.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating DPGSRES&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Unless you specify some other value, the CREATE FILE command sets DPGSRES to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DPGSRES = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min&amp;lt;/var&amp;gt;(&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2, 40) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;That is, DPGSRES is either (&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2) or 40, whichever is smaller. Since &lt;br /&gt;
&amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 = 40 when &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; = 1900:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;amp;lt; 1900, DPGSRES = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt;/50 + 2 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;and:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; &amp;gt;= 1900, DPGSRES = 40 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing DSIZE===&lt;br /&gt;
&amp;lt;p&amp;gt;The total amount of space required for Table D is the sum of the space computed for the Ordered Index pages, the index lists, the preallocated field record descriptions, the procedure texts, the procedure dictionary, the ACT, and the reserved area.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;OIT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;IT&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; + &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; + (&amp;lt;var&amp;gt;K&amp;lt;/var&amp;gt; * PDSIZE) + &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = &amp;lt;var&amp;gt;DEST&amp;lt;/var&amp;gt; + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can change the value of DSIZE using the INCREASE and DECREASE commands. DSIZE cannot exceed 16,777,216. The default value of DSIZE is 15.    &amp;lt;/p&amp;gt;&lt;br /&gt;
==Sizing and managing Table E==&lt;br /&gt;
&amp;lt;p&amp;gt;The following parameters pertain to Table E sizing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ESIZE - The number of file pages in Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EHIGHPG - The highest active Table E page. The first page in Table E is page zero.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;EPGSUSED - The number of Table E pages currently in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Storing Large Object Data===&lt;br /&gt;
&amp;lt;p&amp;gt;Each instance of a Large Object field occupies an integral number of Table E pages, where each page can hold up to 6144 bytes of data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A Large Object field with a null value (or 0 bytes of data) occupies no Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object field data from 1 to 6144 bytes occupies one Table E page. If the data is from 1 to 6143 bytes, the page is not completely filled. so the remainder of the page is unused.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large Object data of 6145 bytes requires two Table E pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The pages used to store a Large Object value are always contiguous in Table E. If you specify the RESERVE option when the data is stored, then enough contiguous pages are allocated to hold the full RESERVE length, even if the actual size of the data initially stored is less than that.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If possible, when space to store Large Object data is required from Table E, then the space is allocated from the pages past EHIGHPG-even if there are free pages in Table E before the EHIGHPG point. In other words, data in Table E is initially stored in entry order. Eventually, when there is insufficient space left at the end of Table E, then space is allocated from the unused pages in Table E. Unused pages are a result of deleting Large Object data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Even if the number of free pages (ESIZE minus EPGSUSED) is sufficient, it might not be possible to obtain the required Table E space. The free pages must also be contiguous. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Computing Table E size - ESIZE===&lt;br /&gt;
&amp;lt;b&amp;gt;Formula for sizing the ESIZE parameter&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Set ESIZE as the number of Data pages, plus the number Bitmap pages plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;To calculate the number of Data pages: Average the BLOB/CLOB length, add 6144, and divide by 6144. Then, round down the result and multiply by the number of Large Object fields.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;First calculation: (Avg.-BLOB-len + 6144) / 6144 = result&lt;br /&gt;
&lt;br /&gt;
Second calculation: 1st Round up result&lt;br /&gt;
&lt;br /&gt;
Data pages = round-up-result * No.-of-BLOBs&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To calculate the number of Bitmap pages: Add 17 to (Data pages / 49152) and add 1. Then, round up the result.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (Data-pages / 49152) + 1 = 2nd result&lt;br /&gt;
&lt;br /&gt;
Bitmap pages = 2nd round up result&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate ESIZE&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ESIZE = Data pages + bitmap pages&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
===Managing Large Object data===&lt;br /&gt;
&amp;lt;p&amp;gt;If a file was originally created with ESIZE=0, this can be changed only by recreating the file. Otherwise, you issue an INCREASE TABLEE or DECREASE TABLEE command to change the size of Table E-subject to the standard restrictions that apply to the INCREASE and DECREASE commands.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Generally speaking, the cost of finding free space in Table E is very low during the initial phase, when EHIGHPG is still increasing, but more expensive later, particularly when Table E free pages are fragmented: for example, if the Large Object data stored in the file show a wide variation in size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the Large Object data stored in your database are volatile because of a high number of deletions and additions, Rocket Software recommends that you store the Large Object data in an individual file (or files), plus an indexed field to cross-reference the Large Object field to the data in other files. This enables you to size, manage, and reorganize the Large Object data independently of your other files. This approach is particularly beneficial if you are new to using Large Object fields and find it difficult to accurately determine the Large Object data space requirement in advance.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Compacting Table E==&lt;br /&gt;
===Table E compactor and TABLEE command===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores large objects as consecutive chunks of Table E pages. When large objects are created and deleted frequently, gaps can occur between objects that may not be reused due to their small size. The COMPACTE command lets you compact Table E by grouping gaps together, thus reducing Table E fragmentation. To find usable gaps that may be compacted, the Table E map must be analyzed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The Table E compactor can combine orphan spaces in Table E without file reorganization and run without exclusive use of file. When processing finds a gap, the large object that follows the gap is switched with the gap. The large object moves left, concentrating objects at the beginning of Table E, while the gap moves right, concentrating free space at the end of Table E. Although a Large Object may be pointed to by one and only one record, different fields in the same record may point to different Large Objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Introducing the Large Object header===&lt;br /&gt;
&amp;lt;p&amp;gt;To make the Table E compaction process work each large object starts with a header. (The object descriptor in the Table B record is not changed and the large object header length is not included in the large object descriptor length.) The large object header contains a field for the Table B record number that points to the large object-thus a backward pointer to the Table B record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Implementing a large object header requires file reorganization if the file was created earlier than V7R1.0. Only V7R1.0 or later files are eligible for COMPACTE processing. No application changes are required. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Files created in V7R1.0 with Table E size greater than zero are not backward compatible and cannot be opened in earlier releases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When each large object is stored, the new header is also included. The large object header requires the following additional storage and must be calculated for Table E sizing requirements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The large object header has the following 4-byte entries:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Table B record number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Large object length in pages, including reserved pages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Field attribute&lt;br /&gt;
&amp;lt;p&amp;gt;The field attribute facilitates the Table B record search to find a field with the object descriptor. The header length is 27 bytes if preallocated, 30 bytes otherwise.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Considerations for compacting Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Some compactions may be counter productive. For example, if a segment has 49 objects, each the size of 1000 pages, and 49 gaps of 1-2 bytes each for a total size of 152 pages, then moving 49,000 pages to reclaim a modest 152 page gap is inefficient. On the other hand for objects with average size of 1-100 pages, compacting a hundred 1-page gaps is beneficial. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The TABLEE command, like the TABLEB command, reports Table E usage statistics: the number of gaps and total gap size. Because compaction is heavily I/O and CPU intensive, you should compact Table E only when you can expect substantial results.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For files with large Table E and really large objects (thousands of pages) you must take care to prevent unnecessary page movements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The compactor analyzes Table E on a segment by segment basis, where each segment represents 49,152 pages of Table E.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Table E contains not only object pages but bitmap pages also. The current compactor&#039;s implementation has the following limitations:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bitmap pages allocated one per segment are not moved, so the worst result of compaction is two gaps per segment.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects residing in more than one segment are not moved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
===Using the TABLEE and COMPACTE commands===&lt;br /&gt;
&amp;lt;p&amp;gt;To effectively compact Table E, Rocket Software recommends running a TABLEE command with the SEG option, identifying segments with large number of gaps, running COMPACTE command for segments of interest, and then running another TABLEE command for compacted segments to check the results.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE back out and recovery===&lt;br /&gt;
&amp;lt;p&amp;gt;No back out capabilities are provided for Table E compaction. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To facilitate recovery, the compactor writes preimages of all a large object&#039;s pages that are subject to move. You may need to increase checkpoint data set size. In the worst case almost all pages in Table E may be preimaged. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The journal data set size increase is much smaller. It writes 50 bytes per object moved. If a problem happens during compaction, base the recovery action on error messages. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while analyzing Table E (messages 2809, 2810, 2818, 2819, 2821), a file must be regenerated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For error messages generated while moving an object (messages 2811, 2823) a normal file recovery should be adequate. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the problem persists, you must regenerate the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE performance===&lt;br /&gt;
&amp;lt;p&amp;gt;Table E compactor processing is highly I/O and CPU intensive. When gaps combine and grow in size, it may be quite expensive to do page-by-page constraints checking. Use of EXCL option lets you avoid constraints checking, but the total file will be unavailable to other users for the duration of compaction.&amp;lt;/p&amp;gt;&lt;br /&gt;
===COMPACTE and checkpoint===&lt;br /&gt;
&amp;lt;p&amp;gt;The COMPACTE command runs as one long transaction. After reading the MAXPR (number of pages), processing stops, the transaction ends, and a checkpoint is attempted. Also, at this time processing checks whether the user is being bumped or is exceeding limits, such as I/O or CPU slices or a higher priority user needs to run. These checks happen only after an object has been moved. If a very long-hundreds of pages-object is moved, the transaction or sub transaction checkpoint may be delayed or prevented.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Creating a file with a Table X==&lt;br /&gt;
&amp;lt;p&amp;gt;A file has Table X allocated when XSIZE greater than zero is designated at file create.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In the following example, when XSIZE is set greater than zero, Table X is established for the VEHICLES file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CREATE FILE VEHICLES&lt;br /&gt;
   PARAMETER FILEORG=X&#039;24&amp;quot; */Unordered, RRN file organization/*&lt;br /&gt;
   PARAMETER BSIZE=128&lt;br /&gt;
   PARAMETER BRESERVE=100 */100 free bytes are required to store a/*&lt;br /&gt;
                          */a new record on page                  /*&lt;br /&gt;
   PARAMETER BREUSE=30    */when 30% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
   PARAMETER XSIZE=600&lt;br /&gt;
   PARAMETER XRESERVE=800 */800 free bytes are required to store  /*&lt;br /&gt;
                          */a new record for Table X on page      /*&lt;br /&gt;
   PARAMETER XREUSE=15    */when 15% or more page space is free,  /*&lt;br /&gt;
                          */put page on reuse queue               /*&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Considerations for Table X===&lt;br /&gt;
&amp;lt;p&amp;gt;If you want to add a Table X to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created prior to V7R21.0, you must re-create the file and reload it in V7R1.0 or later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can implement Table X for files created in V7R1.0 or later that are unordered or entry order, but Table X is not supported for sort key and hash key files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you issue a VIEW TABLES command against a file that does not have a Table X, the Table X parameters are displayed with zero values. See &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference for a description of the Table X parameters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If XAUTOINC is set to a non zero value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; will automatically increase Table X as needed, when the file is opened by the first user. &amp;lt;/p&amp;gt;&lt;br /&gt;
==Data set allocation==&lt;br /&gt;
&amp;lt;p&amp;gt;After you have finished the preceding calculations, you can allocate data sets for the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
===Minimum number of pages required===&lt;br /&gt;
&amp;lt;p&amp;gt;The minimum number of pages required for the file is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can allocate more disk space. When the file is created, any pages not assigned to the File Control Table (always eight pages) or Tables A through D are designated free space and can be used later to expand Tables B, D, and E.      &amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating disk space===&lt;br /&gt;
&amp;lt;p&amp;gt;Allocate disk space in either tracks or cylinders, without specifying a secondary allocation. [[#Allocating disk space|Allocating disk space]] can help to determine how many pages &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores on each track for your device type. The page size for all devices is 6184 bytes.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Disk space requirements&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Device type&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Pages/tracks&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks/cylinder&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3330&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;19&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3340&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3350&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;30&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3375&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3380&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3390&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;15&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FACOM 6421&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For example, a file that you calculate to need 1275 pages requires at least 183 tracks on a 3380 device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Support for FBA devices&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; also supports fixed-block-architecture devices (3370s) under the z/VM/SP and z/VSE operating systems; FBA devices require 13 blocks per page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Guidelines for allocating data sets&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The space can be allocated in one or more data sets on one or more disk packs as you see fit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Keep the number of data sets small, if core is a problem. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a heavily used file, you can greatly improve efficiency by distributing the tables into several data sets on several volumes, each maintained on different channels and control units.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Allocating data sets===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To allocate z/OS data sets, use the IBM utility IEFBR14. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB IEFBR14 DELETE AND CREATE&lt;br /&gt;
//STEP1 EXEC PGM=IEFBR14&lt;br /&gt;
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=(NEW,CATLG),&lt;br /&gt;
// SPACE=(TRK,183),UNIT=3380&lt;br /&gt;
// &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The choice of data set names is, of course, entirely yours, as is the decision whether or not to catalog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a large enough piece of contiguous space is available on the disk, a slight improvement can be made by allocating the data set on contiguous tracks. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SPACE=(TRK,183,,CONTIG) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility provided with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is used to preallocate database files, the CCATEMP file, the CCAGRP file, and the CCASERVR files. It can allocate one or more of these files, as specified in control statements, during one execution. For each file referenced in the ALLOCATE control statements, provide a DLBL and EXTENT with complete information. The utility opens each of these files as output data sets to make entries into the volume table of contents.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For variable format (z/OS and z/VSE) z/VM minidisks that have been initialized using the INITIAL parameter of the M204UTIL command, allocate data sets with the ALLOCATE parameter of the M204UTIL command. An example follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ACCESS 201 M&lt;br /&gt;
M204UTIL ALLOC M204 FILE PEOPLE M (P 183 TRK &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The minidisk where the allocation is to be performed must be accessed before issuing M204UTIL ALLOCATE from z/VM. M204UTIL ALLOCATE does not catalog data sets. For further description of M204UTIL see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; System Manager&#039;s Guide.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ALLOCATE control statement&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE control statement format is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALLOCATE FILE(&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename2&amp;lt;/var&amp;gt; ... &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt;) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The statement is free form and can begin in any column. You can have any number of ALLOCATE control statements in the input to the utility. Continuation from one input record to the next is indicated by a dash (minus sign) after the last parameter on the input record being continued. There is no limitation on the number of continuation statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The parameters &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename1&amp;lt;/var&amp;gt; through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filenameN&amp;lt;/var&amp;gt; refer to the filenames on the DLBL statements in the job control stream. If a filename referenced in the ALLOCATE control does not have a corresponding DLBL statement in the JCL, an error message is written in the output audit trail.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Comment statements beginning with an asterisk in column 1 can be interspersed with the ALLOCATE control statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ALLOCATE utility also runs in a mode compatible with earlier releases. If the control statements are omitted, the utility attempts to allocate a single file with a filename of NEWFILE. A DLBL and EXTENT for NEWFILE must be provided in the JCL used to run the utility.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following sample ALLOCATE utility job stream shows that the file PEOPLE with 183 tracks of space beginning at relative track number 1000 is allocated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; // JOB ALLOCATE MODEL 204 FILE&lt;br /&gt;
 // DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
 // EXTENT,volser&lt;br /&gt;
 // LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
 // DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,99/365&lt;br /&gt;
 // EXTENT SYS001,SYSWK1,,,1000,183&lt;br /&gt;
 // EXEC ALLOCATE,SIZE=AUTO&lt;br /&gt;
 ALLOCATE FILE(PEOPLE)&lt;br /&gt;
 /*&lt;br /&gt;
 /&amp;amp;amp; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space estimation example==&lt;br /&gt;
&amp;lt;p&amp;gt;To perform a simple space calculation, assume that a simple personnel file of 90,000 records has characteristics listed in [[#Space estimation example|Space estimation example]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;All fields are UPDATE IN PLACE. SSN is given the CODED attribute so that numbers that start with a zero can be stored in coded form in the preallocated space. All other SSN values are stored as 4-byte binary. Because only a small number of values start with a zero, SSN does not have any effect on Table A space estimates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Personnel file characteristics example&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Options&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Average value length&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments on distribution of KEY and NUMERIC RANGE values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST_NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHAR&lt;br /&gt;
IMMED 2 LRES 15&lt;br /&gt;
INVISIBLE&lt;br /&gt;
NON-KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;-&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NON-FRV&lt;br /&gt;
BINARY&lt;br /&gt;
CODED&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
OCCURS 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Unique to each record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&lt;br /&gt;
NON-CODED&lt;br /&gt;
OCCURS 1&lt;br /&gt;
LENGTH 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55 possible values, evenly distributed (18-72).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-KEY&lt;br /&gt;
NUM RANGE&lt;br /&gt;
NON-CODED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20,000 possible values, evenly distributed.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&lt;br /&gt;
CODED&lt;br /&gt;
FRV&lt;br /&gt;
FEW-VALUED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;10 values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Values for Personnel Dept. occur only in the first 40,000 records. Values for Accounting Dept. occur only in the last 10,000 records. The other 8 values occur evenly in the remaining 5000 records in segment 1 and the remaining 35,000 records in segment 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
==Sample Table A calculations==&lt;br /&gt;
===Calculating ASTRPPG===&lt;br /&gt;
&amp;lt;b&amp;gt;FRV or CODED values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;  Field  # of Values  Space        Overhead   Total&lt;br /&gt;
AGE   55             2*55=110    3*55=1651  10+165=275&lt;br /&gt;
DEPT  10            10*10=100    3*10=3010   0+ 30=130&lt;br /&gt;
&lt;br /&gt;
  B = 65                                         V=405&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Field Names&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LEN&lt;br /&gt;
+ 2[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ANY&lt;br /&gt;
+ UP[[#File Size Calculation|File Size Calculation]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;COD/&lt;br /&gt;
FRV&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;OCC&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LVL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;FLOAT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ORD&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;UNIQ&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;NR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FULL_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LAST_NAME&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;16&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SSN&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;(3)[[#File Size Calculation|File Size Calculation]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AGE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;35&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;49&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SALARY&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;80&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;91&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;DEPT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;11&amp;quot;&amp;gt;N = 191&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LEN is the length of the field name&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ANY refers to the two bytes required from page 3-5. UP refers to the one byte required for UPDATE IN PLACE fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because only a small number of value in SSN start with a zero, this field does not have any effect on Table A space estimates.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;A = 6&lt;br /&gt;
D(AGE)&amp;lt;/var&amp;gt; = 2 + 3 = &amp;lt;var&amp;gt;5&lt;br /&gt;
D(SALARY)&amp;lt;/var&amp;gt; = 5 + 3 = &amp;lt;var&amp;gt;8&lt;br /&gt;
S&amp;lt;/var&amp;gt; = 5 + 8 = &amp;lt;var&amp;gt;13&lt;br /&gt;
T&amp;lt;/var&amp;gt; = A + B + S = 6 + 65 +13 = &amp;lt;var&amp;gt;84&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; = average length of character strings = &lt;br /&gt;
&lt;br /&gt;
(V + N)/T = (405 + 191)/84 = 7.0 = 7&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;ASTRPPG&amp;lt;/var&amp;gt; = 6144/L = 6144/7 = 877.7 = &amp;lt;var&amp;gt;877&amp;lt;/var&amp;gt; (rounded down)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating ATRPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by field names including overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of extra NUMERIC RANGE fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * N/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/(6144 - (877 * 2) -2) &lt;br /&gt;
&lt;br /&gt;
 = 1.1 * 191/4388 = 0.04 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;ASTRPG&amp;lt;/var&amp;gt; = 1.1 * (A + S)/ASTRPG&lt;br /&gt;
&lt;br /&gt;
 = 1.1 * (6+ 13)/877&lt;br /&gt;
&lt;br /&gt;
 = 0.02 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating FVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;The following numbers are estimated as part of ASTRPPG:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total space consumed by FEW-VALUED fields including overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * V/(6144 - (ASTRPPG * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/(6144 - (877 * 2) -2)&lt;br /&gt;
&lt;br /&gt;
 = 1.2 * 405/4388 = 0.11 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;FVFPG&amp;lt;/var&amp;gt; = 1.2 * B/ASTRPPG = 1.2 * 65/877 = 0.08 = &amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating MVFPG===&lt;br /&gt;
&amp;lt;p&amp;gt;There are no MANY-VALUED, FRV, or CODED fields, but a minimum of one page must be allocated to each Table A section. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; MVFPG = 1    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table B calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Total bytes required per record&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FULL NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;23&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Overhead&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; =&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;48&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
===Calculating BRECPPG===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BRECPPG&amp;lt;/var&amp;gt; = 1.1 * (6144 - 4)/R = 1.1 * 6140/48&lt;br /&gt;
&lt;br /&gt;
 = 140.7 = &amp;lt;var&amp;gt;141&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BRESERVE===&lt;br /&gt;
&amp;lt;p&amp;gt;BRESERVE is equal to &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt;, above. Therefore:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BRESERVE = &amp;lt;var&amp;gt;R&amp;lt;/var&amp;gt; = 48&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating BSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;BSIZE&amp;lt;/var&amp;gt; = 1.2 * (Total # of Records)/BRECPPG &lt;br /&gt;
&lt;br /&gt;
   = 1.2 * 90000/141 = 765.9 = &amp;lt;var&amp;gt;766&amp;lt;/var&amp;gt; (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Calculating the file size multiplier example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;N = (# of Records in the file)/(8 * 6144) =&lt;br /&gt;
&lt;br /&gt;
 90000/49152 = 1.83 = 2 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table C calculations==&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vu pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vn pairs&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Vr entries&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SSN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NUM RANGE)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TOTAL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;90000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20120&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;74&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating CSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CSIZE=1.2 * ((14*Vu) + 7 * (N+1)(Vn+Vr)) / (6144-4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;which calculates out and rounds up to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1.2 * ((14*90000) + 7 * (3)(20120+74)) / 6140 = 330&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table D calculations==&lt;br /&gt;
===Calculating Ordered Index space===&lt;br /&gt;
&amp;lt;p&amp;gt;The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of distinct values stored in the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average number of records per value per segment..&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OIB &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total Ordered Index B-tree entry lengths.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LOa &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf page overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Leaf node pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered entry B-tree pages for the field.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;Values in &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category A&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category B&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Category C&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;60000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;5000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;500&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating total Ordered Index B-tree entry lengths&amp;lt;/b&amp;gt;&lt;br /&gt;
[[File:_File_Size_Calculation_2.gif]]&lt;br /&gt;
&amp;lt;b&amp;gt;Calculating Ordered Index B-tree overhead&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The final values for LOe, LP, and OI are rounded up.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * (LRESERVE/100) = 6144 * (15/100) = 922&lt;br /&gt;
&lt;br /&gt;
AE = OIB / NE = 1011000 / 65500 = 15&lt;br /&gt;
&lt;br /&gt;
LOmin = 2 * (6144 / AE) = 2 * (6144 / 15) = 819 &lt;br /&gt;
&lt;br /&gt;
LOa = max(LOe, LOmin) = max(922, 819) = 922&lt;br /&gt;
&lt;br /&gt;
LP = OIB / (6144 - 24 - LOa) = 1011000 / (6144 - 24 - 922) = 195 &lt;br /&gt;
&lt;br /&gt;
OI = LP * 1.01 = 195 * 1.91 = 197&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating index list space===&lt;br /&gt;
&amp;lt;p&amp;gt;For this example, assume that there are 2 segments containing 45,000 records each. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;If a field name = value pair appears in...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt; It falls into category... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fewer than 900 (0.02 * 45000) records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;More than 900 records&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each value, the number of category A bytes required (&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;) is calculated using the following equation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&#039;= 2 + (2 * (Number of Records Containing the Pair)) &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The number of category B pages required for each field is equal to the number of distinct values of that field. For each NUMERIC RANGE value, the extra number of pages required equals ten times the number of significant digits, plus two.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following calculations use these variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Category A bytes.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A  &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages in Category A.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of pages (or values) in Category B.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of extra numeric range pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;40000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;625.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8(2+2(625))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T1 = 326216&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B1 = 3&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C1 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;X = 6166 * (1-(DRESERVE / 100)) = 6144 * 0.85 = B&lt;br /&gt;
&lt;br /&gt;
A1 = T1 / X = 326216 / 5222 = 63 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Values for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Field name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number &lt;br /&gt;
of distinct values&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Records per value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category A bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Category B bytes&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Extra NUM RANGE pages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (KEY)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AGE (NR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;55&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;818.2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;55(2+2(818.2))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;22&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SALARY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;20000&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2.25&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20000(2+2(2.25))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;52&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LAST NAME&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;498&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;498(2+(2*5))&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;   (ORD CHAR)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1500.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEPT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    PERS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;    ACCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10000.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Other values&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4375.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;T2 = 316200&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;B2 = 11&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;C2 = 74&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculations for segment 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A2 = T1 / X = 316200 / 5222 = 60.5 = 61 (Rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Total index list space===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IT = A&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + C1 + A&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + B&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + C&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + 2 =&lt;br /&gt;
&lt;br /&gt;
     63 + 3 + 74 + 61 + 11 + 74 + 2 = 288&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Determining F (space required for preallocated fields)===&lt;br /&gt;
&amp;lt;p&amp;gt;If you have defined any preallocated fields in a file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses one Table D page for the record description. Because two of the fields in this example are preallocated (have the OCCURS attribute):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F = 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for procedures===&lt;br /&gt;
&amp;lt;p&amp;gt;The file holds approximately 50 procedures with 20-character names. This examples does not use procedure security. The calculations in this section use the following variables:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;P &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of procedures.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average size of procedure entry.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;K &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of blocks of pages.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Q &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of pages required for ACT.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;P = 50&lt;br /&gt;
&lt;br /&gt;
S = Name length + Overhead = 20 + 34 = 54&lt;br /&gt;
&lt;br /&gt;
PDSTRPPG = 6144 / s = 6144 / 54 = 113.7 = 113 (Rounded down)&lt;br /&gt;
&lt;br /&gt;
PDSIZE = 1.4 (P/PDSTRPPG) = 1.4 * (50/113) = 0.61 = 1 (Rounded up)&lt;br /&gt;
&lt;br /&gt;
K = 1&lt;br /&gt;
&lt;br /&gt;
Q = 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating space required for reserved area===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEST    = OIT + IT + F + P + (K * PDSIZE) + Q = &lt;br /&gt;
&lt;br /&gt;
          197 + 288 + 1 + 50 + 1 + 0 = 537&lt;br /&gt;
&lt;br /&gt;
DPGSRES = min(DEST/50 + 2, 40) = min(537/50 + 2, 40)&lt;br /&gt;
&lt;br /&gt;
        = 13 (rounded up)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating DSIZE===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE   =  DEST + DPGSRES = 537 + 13 = 550   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Sample Table E calculations==&lt;br /&gt;
&amp;lt;p&amp;gt;Sizing Table E&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;You can set the ESIZE parameter when the file is created to the default of 0, meaning that no Large Object data can be stored in the file. If you plan to have Large Object data in the file, you must set the ESIZE to a minimum value of 20. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When you initialize a file with ESIZE set to 20 or greater, the first 17 pages of Table E are used for Table E internal structures. Immediately after initialization the other Table E parameters are: EHIGHPG=16 and EPGSUSED=17.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Each time you store another Large Object the data begins on the next available Table E page. There is no reuse capability for Table E. So, you must estimate in advance the size of the Large Object data and how many pages you will need.&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculating Table E size===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first page of Table E is reserved for the existence bitmap of page map page numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The next fifteen pages of Table E are reserved for the page map pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The seventeenth page is the first bitmap page. Subsequent bitmap pages are allocated as needed and are therefore intermingled with the Large Object data pages. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following steps and formulas to determine how many Table E pages you need:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the pages-to-hold-data as:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each Large Object field, add the Large Object field data bytes to 6139, then divide by 6140 and multiply by the number of Large Object fields. For example, if a Large Object field is 7000 bytes, it will require two Table E pages. Using this calculation, determine the total pages-to-hold-data&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Example: 5,000 Large Object fields with a length of 7000:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7000/6144 rounded up = 2 pages multiplied by 5,000 fields = 10,000 pages-to-hold-data&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the pages-to-hold-bitmaps as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;17 + (pages-to-hold-data /49152) + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calculate the ESIZE setting you need as:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;pages-to-hold-data + pages-to-hold-bitmaps + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
==Calculating sample total file size==&lt;br /&gt;
&amp;lt;p&amp;gt;The total file size for this example is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8 + ASIZE + BSIZE + CSIZE + DSIZE =&lt;br /&gt;
&lt;br /&gt;
8 + 3 + 766 + 330 + 550 =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;1657 pages, or 237 tracks on a 3380&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Space calculation worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;This worksheet lists all the equations used in this chapter to calculate the number of pages needed for a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1. Model 204 Usable Page Size constant = 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table A size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 2 through 6:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of field names. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of FEW-VALUED FRV or CODED values. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;C &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of MANY-VALUED FRV or CODED values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;D &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Maximum number of digits in a NUMERIC RANGE field + 3. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sum of all D&#039;s for all NUMERIC RANGE fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;T &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of strings: A + B + S + C. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;V &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by FEW-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;W&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by MANY-VALUED FRV or CODED values and value overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Space needed by field names and names overhead. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;L represents the length of each string&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2. L = (V + N + W) / T&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASTRPPG parameter represents the character strings per Table A page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;3. ASTRPPG = 6144 / L&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ATRPG parameter represents the number of attribute pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4. ATRPG = 1.1 * N / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ATRPG = 1.1 * (A + S) / ASTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The FVFPG parameter represents the number of FEW-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;5. FVFPG = 1.2 * V / (6144 - (ASTRPPG * 2) - 2)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FVFPG= 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MVFPG parameter represents the number of MANY-VALUED pages&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;6. MVFPG = 1.2 * (V / (6144 - (ASTRPPG * 2) - 2) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MVFPG = 1.2 * (B / ASTRPPG)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The ASIZE parameter represents the size of Table A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;7. ASIZE=ATRPG+FVFPG+MVFPG (calculated by Model 204)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table B size===&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variable in Equations 8 through 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;R&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Average record size. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BRECPPG parameter represents table records per page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;8. BRECPPG = 1.1 * 6140 / R&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The BSIZE parameter represent the size of Table B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;9. BSIZE = 1.2 * (Total-number-of-records / BRECPPG)&lt;br /&gt;
&lt;br /&gt;
10. BRESERVE = Reserved Table B space&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table C size===&lt;br /&gt;
&amp;lt;p&amp;gt;The N variable represents the file size multiplier&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;11. N = Number-of-records-in-the-file &lt;br /&gt;
         / (8 * Page-size)&lt;br /&gt;
&lt;br /&gt;
12. VU = total number of pairs in category U&lt;br /&gt;
&lt;br /&gt;
13. VN = total number of pairs in category N&lt;br /&gt;
&lt;br /&gt;
14. VR = total number of extra entries for all NUM&lt;br /&gt;
         RANGE retrieval fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The CSIZE parameter represents the size of Table C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15. CSIZE = 1.2 * ((14 * VU) + 7 * (N +1)&lt;br /&gt;
    (VN + VR)) / 6140&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate Table D size===&lt;br /&gt;
&amp;lt;b&amp;gt;Estimate the size of the Ordered Index&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following variables in Equations 16 through 24:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Total number of distinct values in the ORDERED field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of segments in the file&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;16.  AV = the estimated av. length of ORDERED values + 1&lt;br /&gt;
&lt;br /&gt;
17.  ValA = number of values in Category A&lt;br /&gt;
&lt;br /&gt;
18.  ValB = number of values in Category B&lt;br /&gt;
&lt;br /&gt;
19.  ValC = number of values in Category C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENa = The total length of the Ordered Index entries placed in category A&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;20.  ENa = ValA * (AV + 3)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENb = The total length of the Ordered Index entries placed in category B&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;21.  ENb = ValB * (AV + (2 * AB) + (2 * N)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;ENc = The total length of the Ordered Index entries placed in category C&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;22.  ENc = ValC * (AV + (5 * N))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The OIB parameter represents the total length of all Ordered Index entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23.  IB = ENa + ENb + ENc =&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOe represents the expected leaf page overhead &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;24. LOe = 6144 * (LRESERVE / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOe = 6144 * ((100 - SPLITPCT) / 100)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of AE represents the average number of bytes per Ordered Index entry&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;25. AE = OIB / EN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOmin represents the minimum leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;26. LOmin = 2 * 6144 / AE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LOa represents the leaf page overhead&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;27.  LOa = max(LOe, LOmin)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LP represents the number of leaf pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;28. LP = OIB / (6120 - LOa)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of OI represents the size of the Ordered Index for each field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;29.  OI = (LP * 1.01)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;OIT = Total size of the Ordered Index&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;30.  OIT = OI&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + OI&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + OI&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n &amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate index list space&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;31.  DRESERVE = % of space reserved for Table D expansion &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T represents the number of bytes required for category A fieldname = value pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;32. T = 2 + (2 * (no. of records with fieldname=value pair))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of X represents the total number of bytes available per Table D page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;33. X = 6144 * (1 - (DRESERVE / 100))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of A represents the total number of pages required by the category A pairs for the segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;34. A = T / X&lt;br /&gt;
&lt;br /&gt;
35. B = total number of pages required by pairs in category B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of T&#039; represents the extra bytes required for NUMERIC RANGE fields&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;36.  T&#039; = 2 + (2 * (Number of Records Containing the Field)) &lt;br /&gt;
&lt;br /&gt;
37.  B&#039; = number of extra values&lt;br /&gt;
&lt;br /&gt;
38.  T&amp;quot; = sum of all values of T&#039;&lt;br /&gt;
&lt;br /&gt;
39.  B&amp;quot; = sum of all values of B&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of C represents the total extra pages required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;40. C = (T&amp;quot; / X) + B&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of I represents the index list space for each segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;41.  I = A + B + C&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of IT represents the total index list space required&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;42.  IT = A1 + B1 + C1 + ... + An + Bn + Cn + N&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate space for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;43.  F = number of Table D pages for preallocated fields&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the procedure dictionary&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;44.  P = total number of procedures&lt;br /&gt;
&lt;br /&gt;
45.  S = average size of procedure entry&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;PDSTRPPG = the maximum number of procedure entries per procedure dictionary page&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;46. PDSTRPPG = 6144 / S&lt;br /&gt;
&lt;br /&gt;
47. PDSIZE = 1.4 * P / PDSTRPPG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the size of the ACT&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LE represents the length of entries for each user class&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;48.  LE = 4 + (2 * NPCLASS)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of LET represents the total length of the user class entries&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;49.  LET = LE&amp;lt;var&amp;gt;1&amp;lt;/var&amp;gt; + LE&amp;lt;var&amp;gt;2&amp;lt;/var&amp;gt; + ... + LE&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of Q represents the number of pages required for the ACT&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;50. Q = LET / 6144&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Calculate the final size of Table D&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;51. DEST = OIT + IT + F + P + (K * PDSIZE) + Q&lt;br /&gt;
&lt;br /&gt;
52. If DEST &amp;amp;lt; 1900, DPGSRES = DEST/50 + 2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;     If DEST &amp;gt;= 1900, DPGSRES = 40&lt;br /&gt;
&lt;br /&gt;
53. DSIZE = OIT + IT + F + P + (K * PDSIZE) + Q + DPGSRES &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DSIZE = DEST + DPGSRES&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the final size for Table E===&lt;br /&gt;
&amp;lt;p&amp;gt;Calculate ESIZE, EHIGHPG, and EPGSUSED as described in [[#Sizing and managing Table E|Sizing and managing Table E]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[!!!NEED SPECIFICS, AS FOR OTHER TABLES!!!]&amp;lt;/p&amp;gt;&lt;br /&gt;
===Calculate the total pages required===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Total pages required = 8 + ASIZE + BSIZE + CSIZE + DSIZE + ESIZE &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==File description worksheet==&lt;br /&gt;
&amp;lt;p&amp;gt;Use the following sample worksheet when compiling a list of parameters to be set during file creation. Values for many of the parameters are computed from the formulas shown in this chapter. Other parameters are discussed throughout this manual and in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Parameter and Command Reference.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;File Description Sheet&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
File Name  ___________________________________________&lt;br /&gt;
&lt;br /&gt;
Record Security Field Name____________________________&lt;br /&gt;
&lt;br /&gt;
Sort/Hash Key Field Name _____________________________&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Parameter    Value            Parameter    Value&lt;br /&gt;
&lt;br /&gt;
FILEORG      ____________     CSIZE        ____________&lt;br /&gt;
FOPT         ____________     DRESERVE     ____________&lt;br /&gt;
FRCVOPT      ____________     DPGSRES      ____________&lt;br /&gt;
ASTRPPG      ____________     PDSIZE       ____________&lt;br /&gt;
ATRPG        ____________     PDSTRPPG     ____________&lt;br /&gt;
FVFPG        ____________     DSIZE        ____________&lt;br /&gt;
MVFPG        ____________     DAUTOINC     ____________&lt;br /&gt;
OPENCTL      ____________&lt;br /&gt;
BRECPPG      ____________     PRIVDEF      ____________&lt;br /&gt;
BRESERVE     ____________     PRCLDEF      ____________&lt;br /&gt;
BPGPMSTR     ____________     SELLVL       ____________&lt;br /&gt;
BPFPOVFL     ____________     READLVL      ____________&lt;br /&gt;
BEXTOVFL     ____________     UPDTVL       ____________&lt;br /&gt;
BREUSE       ____________     ADDLVL       ____________&lt;br /&gt;
BSIZE        ____________     ESIZE        ____________&lt;br /&gt;
BAUTOINC     ____________&lt;br /&gt;
BRLIMSZ      ____________     XSIZE        ____________&lt;br /&gt;
RECROPT      ____________     XAUTOINC     ____________&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;3.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:File manager]]&lt;br /&gt;
[[Category:File management]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59413</id>
		<title>Table B (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59413"/>
		<updated>2013-05-07T00:53:48Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* The Reuse Queue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This topic covers the internal architecture of a Model 204 Table B page. &lt;br /&gt;
&lt;br /&gt;
For a discussion of the ways a File Manager may organize these pages in a file, please refer to [[File Design (File Management)]]. &lt;br /&gt;
&lt;br /&gt;
At a minimum, Table B contains all of the base records in a Model 204 file. If [[Table X (File Architecture)|Table X]] is not enabled it also contains all extension records. If [[Table E (File Architecture)|Table E]] is not enabled, then any data whose contents is greater than 255 bytes must be held as a series of repeating fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The structure of a Table B page ==&lt;br /&gt;
&lt;br /&gt;
::[[File:Table B Basic Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
Not shown is a 4 byte &#039;Reuse Queue Page Number&#039; for Unordered Files. If it is present, it is in the lower left hand corner (&#039;before&#039; (working backwards) the first record on the page). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each of the items in the chart are described, below:&lt;br /&gt;
&lt;br /&gt;
=== Pointers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Free Space Pointer&#039;&#039;&#039; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The free space pointer contains the location of the first byte of free space on the page (as shown in the diagram, where the last record on the page ends). On pages with no records yet stored, it points to the last byte on the page (either the very end, of just before the Reuse Queue Page Number described above).&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Record Pointer Array&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are &#039;&#039;up to&#039;&#039; [[BRECPPG parameter|BRECPPG]] record pointers. These are not physically put onto the page until the record is being added to the file.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;Up to&#039;&#039; because, (except as noted below) it is possible that, as large records are stored, there will not be room for the full number of BRECPPG on the page, and so they would not be stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Enhanced Data Handling ([[FILEORG parameter|FILEORG]] x&#039;100&#039;) files, with [[RECRDOPT parameter|RECRDOPT]] set to x&#039;01&#039;, you will always have space for the full number of BRECPPG record pointers, as their length is included in the calculation of the [[BRLIMSZ parameter]].&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Internal Record Number&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The record pointer is a useful identifier of a record, and is referred to as the &#039;Internal Record Number&#039; (IRN).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If, for example, [[BRECPPG parameter|BRECPPG]] is set to 10, the first Table B page will contain records 0 to 9 (the first record in a Model 204 file is IRN 0); the second page contains IRNs 10 to 19, and so on.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[$CURREC]] for a handy way to utilize the IRN.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that the IRN is not a permanent record identifier. If the file is reorganized it is highly likely that almost all records will have a different IRN afterward.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Space Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Space Management Across Pages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Records ===&lt;br /&gt;
&lt;br /&gt;
=== Further information on Records ===&lt;br /&gt;
&lt;br /&gt;
Refer to [[Record (File Architecture)|Records]] and [[Adding Records (File Architecture)|Adding Records]] for a full discussion of record architecture.&lt;br /&gt;
&lt;br /&gt;
Refer also to [[Record Design (File management)|Record design]] for the use of Model 204 Records.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) Segments&amp;quot;&amp;gt;Table B Segments&amp;lt;/div&amp;gt; ===  &lt;br /&gt;
&lt;br /&gt;
==== Definition ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used in indexing. As bit maps can contain bits covering 49152 records (usable space of 6144 * 8) records, this number of records is called a segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Importance of and Use ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to indexing, segments are used, when a procedure is compiled, to track the maximum number of Table B segments that the code needs to be able to handle (remember that sets of records are tracked via bit maps). &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[INCREASE command]] boundaries ====&lt;br /&gt;
&lt;br /&gt;
==== Use in Indexing ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The segment concept is inherent to Model 204 indexing in a number of ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See [[#Table C (File Architecture)#Segment Entries |Table C Segment Entries]] for the effect of segments in the hash index.&lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#B-Tree index structure|B-Tree index structure]] for the effect of segments in the ordered index.  &lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#Bit Maps Used In Indexing|bit maps used in indexing]] for how segments relate to the detailed level of both types of indexes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) The Reuse Queue&amp;quot;&amp;gt;The Reuse Queue&amp;lt;/div&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Reuse Record Number (RRN) files ([[FILEORG parameter|FILEORG]] x&#039;04&#039; bit set) pages with sufficient space (see the [[BREUSE parameter]]) and one or more available record slots are kept in a reuse queue.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This may happen due to records (or large numbers of fields) are deleted.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These use the 4 byte reuse queue page number to track the pages&#039;s availability.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;RRN files add records to the pages from the queue before adding records to [[BHIGHPG parameter|BHIGHPG]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table B==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This table excludes the parameters used for [[Hash Key Files|Hash Key]] and [[Sorted Files]]. Please see those topics for a full discussion of their special parameters (and distinction in meanings for some of these).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also not shown are the parameters which control the [[#Resizing Tables (File Management) Automatic Increases|automatic increase]] in table size, which see.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
::{|&lt;br /&gt;
|[[BHIGHPG parameter]]&lt;br /&gt;
|Table B highest active page. Normally the high water mark of pages &amp;lt;br&amp;gt;used (except for Hash Key and Sorted files). Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BQLEN parameter]]&lt;br /&gt;
|The number of pages in the reuse queue. Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRECPPG parameter]]&lt;br /&gt;
|The maximum number of record slots on a Table B page. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRESERVE parameter]]&lt;br /&gt;
|Table B Reserved space. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSE parameter]]&lt;br /&gt;
|The minimum amount of space necessary to add a page to the reuse queue. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSED parameter]]&lt;br /&gt;
|The numberof record slots reused. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRLIMSZ parameter]]&lt;br /&gt;
|Base record size maximum. Viewable only.   &lt;br /&gt;
|-&lt;br /&gt;
|[[BSIZE parameter]]&lt;br /&gt;
|The number of pages in Table B. &lt;br /&gt;
|-&lt;br /&gt;
|[[RECRDOPT parameter]]&lt;br /&gt;
|Record storage options. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59412</id>
		<title>Table B (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59412"/>
		<updated>2013-05-07T00:53:01Z</updated>

		<summary type="html">&lt;p&gt;Rob: /* Use in Indexing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This topic covers the internal architecture of a Model 204 Table B page. &lt;br /&gt;
&lt;br /&gt;
For a discussion of the ways a File Manager may organize these pages in a file, please refer to [[File Design (File Management)]]. &lt;br /&gt;
&lt;br /&gt;
At a minimum, Table B contains all of the base records in a Model 204 file. If [[Table X (File Architecture)|Table X]] is not enabled it also contains all extension records. If [[Table E (File Architecture)|Table E]] is not enabled, then any data whose contents is greater than 255 bytes must be held as a series of repeating fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The structure of a Table B page ==&lt;br /&gt;
&lt;br /&gt;
::[[File:Table B Basic Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
Not shown is a 4 byte &#039;Reuse Queue Page Number&#039; for Unordered Files. If it is present, it is in the lower left hand corner (&#039;before&#039; (working backwards) the first record on the page). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each of the items in the chart are described, below:&lt;br /&gt;
&lt;br /&gt;
=== Pointers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Free Space Pointer&#039;&#039;&#039; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The free space pointer contains the location of the first byte of free space on the page (as shown in the diagram, where the last record on the page ends). On pages with no records yet stored, it points to the last byte on the page (either the very end, of just before the Reuse Queue Page Number described above).&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Record Pointer Array&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are &#039;&#039;up to&#039;&#039; [[BRECPPG parameter|BRECPPG]] record pointers. These are not physically put onto the page until the record is being added to the file.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;Up to&#039;&#039; because, (except as noted below) it is possible that, as large records are stored, there will not be room for the full number of BRECPPG on the page, and so they would not be stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Enhanced Data Handling ([[FILEORG parameter|FILEORG]] x&#039;100&#039;) files, with [[RECRDOPT parameter|RECRDOPT]] set to x&#039;01&#039;, you will always have space for the full number of BRECPPG record pointers, as their length is included in the calculation of the [[BRLIMSZ parameter]].&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Internal Record Number&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The record pointer is a useful identifier of a record, and is referred to as the &#039;Internal Record Number&#039; (IRN).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If, for example, [[BRECPPG parameter|BRECPPG]] is set to 10, the first Table B page will contain records 0 to 9 (the first record in a Model 204 file is IRN 0); the second page contains IRNs 10 to 19, and so on.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[$CURREC]] for a handy way to utilize the IRN.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that the IRN is not a permanent record identifier. If the file is reorganized it is highly likely that almost all records will have a different IRN afterward.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Space Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Space Management Across Pages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Records ===&lt;br /&gt;
&lt;br /&gt;
=== Further information on Records ===&lt;br /&gt;
&lt;br /&gt;
Refer to [[Record (File Architecture)|Records]] and [[Adding Records (File Architecture)|Adding Records]] for a full discussion of record architecture.&lt;br /&gt;
&lt;br /&gt;
Refer also to [[Record Design (File management)|Record design]] for the use of Model 204 Records.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) Segments&amp;quot;&amp;gt;Table B Segments&amp;lt;/div&amp;gt; ===  &lt;br /&gt;
&lt;br /&gt;
==== Definition ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used in indexing. As bit maps can contain bits covering 49152 records (usable space of 6144 * 8) records, this number of records is called a segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Importance of and Use ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to indexing, segments are used, when a procedure is compiled, to track the maximum number of Table B segments that the code needs to be able to handle (remember that sets of records are tracked via bit maps). &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[INCREASE command]] boundaries ====&lt;br /&gt;
&lt;br /&gt;
==== Use in Indexing ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The segment concept is inherent to Model 204 indexing in a number of ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See [[#Table C (File Architecture)#Segment Entries |Table C Segment Entries]] for the effect of segments in the hash index.&lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#B-Tree index structure|B-Tree index structure]] for the effect of segments in the ordered index.  &lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#Bit Maps Used In Indexing|bit maps used in indexing]] for how segments relate to the detailed level of both types of indexes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) The Reuse Queue&amp;quot;&amp;gt;The Reuse Queue&amp;lt;/div&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Reuse Record Number (RRN) files ([[FILEORG parameter|FILEORG]] x&#039;04&#039; bit set) pages with sufficient space (see the [[BREUSE parameter]]) and one or more available record slots are kept in a reuse queue.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This may happen due to records (or large numbers of fields) are deleted.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These use the 4 byte reuse queue page number to track the pages&#039;s availability.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;RRN files add records to the pages from the queue before adding records to [[BHIPAGE parameter|BHIGHPG]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table B==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This table excludes the parameters used for [[Hash Key Files|Hash Key]] and [[Sorted Files]]. Please see those topics for a full discussion of their special parameters (and distinction in meanings for some of these).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also not shown are the parameters which control the [[#Resizing Tables (File Management) Automatic Increases|automatic increase]] in table size, which see.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
::{|&lt;br /&gt;
|[[BHIGHPG parameter]]&lt;br /&gt;
|Table B highest active page. Normally the high water mark of pages &amp;lt;br&amp;gt;used (except for Hash Key and Sorted files). Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BQLEN parameter]]&lt;br /&gt;
|The number of pages in the reuse queue. Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRECPPG parameter]]&lt;br /&gt;
|The maximum number of record slots on a Table B page. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRESERVE parameter]]&lt;br /&gt;
|Table B Reserved space. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSE parameter]]&lt;br /&gt;
|The minimum amount of space necessary to add a page to the reuse queue. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSED parameter]]&lt;br /&gt;
|The numberof record slots reused. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRLIMSZ parameter]]&lt;br /&gt;
|Base record size maximum. Viewable only.   &lt;br /&gt;
|-&lt;br /&gt;
|[[BSIZE parameter]]&lt;br /&gt;
|The number of pages in Table B. &lt;br /&gt;
|-&lt;br /&gt;
|[[RECRDOPT parameter]]&lt;br /&gt;
|Record storage options. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59411</id>
		<title>Table B (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Table_B_(File_architecture)&amp;diff=59411"/>
		<updated>2013-05-07T00:51:02Z</updated>

		<summary type="html">&lt;p&gt;Rob: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This topic covers the internal architecture of a Model 204 Table B page. &lt;br /&gt;
&lt;br /&gt;
For a discussion of the ways a File Manager may organize these pages in a file, please refer to [[File Design (File Management)]]. &lt;br /&gt;
&lt;br /&gt;
At a minimum, Table B contains all of the base records in a Model 204 file. If [[Table X (File Architecture)|Table X]] is not enabled it also contains all extension records. If [[Table E (File Architecture)|Table E]] is not enabled, then any data whose contents is greater than 255 bytes must be held as a series of repeating fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The structure of a Table B page ==&lt;br /&gt;
&lt;br /&gt;
::[[File:Table B Basic Structure (File Architecture).jpg]]&lt;br /&gt;
&lt;br /&gt;
Not shown is a 4 byte &#039;Reuse Queue Page Number&#039; for Unordered Files. If it is present, it is in the lower left hand corner (&#039;before&#039; (working backwards) the first record on the page). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each of the items in the chart are described, below:&lt;br /&gt;
&lt;br /&gt;
=== Pointers ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Free Space Pointer&#039;&#039;&#039; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The free space pointer contains the location of the first byte of free space on the page (as shown in the diagram, where the last record on the page ends). On pages with no records yet stored, it points to the last byte on the page (either the very end, of just before the Reuse Queue Page Number described above).&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Record Pointer Array&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;There are &#039;&#039;up to&#039;&#039; [[BRECPPG parameter|BRECPPG]] record pointers. These are not physically put onto the page until the record is being added to the file.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;Up to&#039;&#039; because, (except as noted below) it is possible that, as large records are stored, there will not be room for the full number of BRECPPG on the page, and so they would not be stored.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Enhanced Data Handling ([[FILEORG parameter|FILEORG]] x&#039;100&#039;) files, with [[RECRDOPT parameter|RECRDOPT]] set to x&#039;01&#039;, you will always have space for the full number of BRECPPG record pointers, as their length is included in the calculation of the [[BRLIMSZ parameter]].&amp;lt;/p&amp;gt;    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Internal Record Number&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Internal Record Number&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The record pointer is a useful identifier of a record, and is referred to as the &#039;Internal Record Number&#039; (IRN).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;If, for example, [[BRECPPG parameter|BRECPPG]] is set to 10, the first Table B page will contain records 0 to 9 (the first record in a Model 204 file is IRN 0); the second page contains IRNs 10 to 19, and so on.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;See [[$CURREC]] for a handy way to utilize the IRN.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that the IRN is not a permanent record identifier. If the file is reorganized it is highly likely that almost all records will have a different IRN afterward.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Space Management ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Space Management Across Pages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Extension Records ===&lt;br /&gt;
&lt;br /&gt;
=== Further information on Records ===&lt;br /&gt;
&lt;br /&gt;
Refer to [[Record (File Architecture)|Records]] and [[Adding Records (File Architecture)|Adding Records]] for a full discussion of record architecture.&lt;br /&gt;
&lt;br /&gt;
Refer also to [[Record Design (File management)|Record design]] for the use of Model 204 Records.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) Segments&amp;quot;&amp;gt;Table B Segments&amp;lt;/div&amp;gt; ===  &lt;br /&gt;
&lt;br /&gt;
==== Definition ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used in indexing. As bit maps can contain bits covering 49152 records (usable space of 6144 * 8) records, this number of records is called a segment&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Importance of and Use ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In addition to indexing, segments are used, when a procedure is compiled, to track the maximum number of Table B segments that the code needs to be able to handle (remember that sets of records are tracked via bit maps). &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== [[INCREASE command]] boundaries ====&lt;br /&gt;
&lt;br /&gt;
==== Use in Indexing ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The segment concept is inherent to Model 204 indexing in a number of ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* See [[#Table C (File Architecture)#Segment Entries |Table C Segment Enrries]] for the effect of segments in the hash index.&lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#B-Tree index structure|B-Tree index structure]] for the effect of segments in the ordered index.  &lt;br /&gt;
&lt;br /&gt;
* See [[#Table D (File Architecture)#Bit Maps Used In Indexing|bit maps used in indexing]] for how segments relate to the detailed level of both types of indexes.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;div id=&amp;quot;Table B (File Architecture) The Reuse Queue&amp;quot;&amp;gt;The Reuse Queue&amp;lt;/div&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For Reuse Record Number (RRN) files ([[FILEORG parameter|FILEORG]] x&#039;04&#039; bit set) pages with sufficient space (see the [[BREUSE parameter]]) and one or more available record slots are kept in a reuse queue.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This may happen due to records (or large numbers of fields) are deleted.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;These use the 4 byte reuse queue page number to track the pages&#039;s availability.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;RRN files add records to the pages from the queue before adding records to [[BHIPAGE parameter|BHIGHPG]].&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The following Parameters relate to the Use of Table B==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This table excludes the parameters used for [[Hash Key Files|Hash Key]] and [[Sorted Files]]. Please see those topics for a full discussion of their special parameters (and distinction in meanings for some of these).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Also not shown are the parameters which control the [[#Resizing Tables (File Management) Automatic Increases|automatic increase]] in table size, which see.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
::{|&lt;br /&gt;
|[[BHIGHPG parameter]]&lt;br /&gt;
|Table B highest active page. Normally the high water mark of pages &amp;lt;br&amp;gt;used (except for Hash Key and Sorted files). Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BQLEN parameter]]&lt;br /&gt;
|The number of pages in the reuse queue. Viewable only. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRECPPG parameter]]&lt;br /&gt;
|The maximum number of record slots on a Table B page. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRESERVE parameter]]&lt;br /&gt;
|Table B Reserved space. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSE parameter]]&lt;br /&gt;
|The minimum amount of space necessary to add a page to the reuse queue. &lt;br /&gt;
|-&lt;br /&gt;
|[[BREUSED parameter]]&lt;br /&gt;
|The numberof record slots reused. &lt;br /&gt;
|-&lt;br /&gt;
|[[BRLIMSZ parameter]]&lt;br /&gt;
|Base record size maximum. Viewable only.   &lt;br /&gt;
|-&lt;br /&gt;
|[[BSIZE parameter]]&lt;br /&gt;
|The number of pages in Table B. &lt;br /&gt;
|-&lt;br /&gt;
|[[RECRDOPT parameter]]&lt;br /&gt;
|Record storage options. &lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Rob</name></author>
	</entry>
</feed>