Table B (File architecture): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
<p>'''Free Space Pointer''' </p>
<p>'''Free Space Pointer''' </p>


<p>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).   
<p>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).</p>  




<p>'''Record Pointer Array'''</p>
<p>'''Record Pointer Array'''</p>


<p>There are ''up to'' [[BRECPPG parameter|BRECPPG]] record pointers.   
<p>There are ''up to'' [[BRECPPG parameter|BRECPPG]] record pointers. These are not physically put onto the page until the record is being added to the file.</p>  


<p>''Up to'' 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.</p>


<p>For Enhanced Data Handling [[FILEORG parameter|FILEORG]] x'100' files, with [[RECRDOPT parameter|RECRDOPT]] set to x'01', 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]].</p>   




=== Space Management ===
== Space Management Across Pages ==
=== Extension Records ===
Refer to [[Record (File Architecture)|Records]] and [[Adding Records (File Architecture)|Adding Records]] for a full discussion of record architecture.




=== Space Management ===


== <div id="Table B (File Architecture) Segments">Table B Segments</div> ==   
=== <div id="Table B (File Architecture) Segments">Table B Segments</div> ===   


=== Definition ===
==== Definition ====


<p>As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used  
<p>As discussed below, [[Bit Maps (File Architecture)|bit maps]] are used  


=== Importance of and Use ===
==== Importance of and Use ====


==== [[INCREASE command]] boundaries ====
==== [[INCREASE command]] boundaries ====
Line 49: Line 60:




== See also ==


[[Adding Records (File Architecture)|Adding Records]]
 
 





Revision as of 01:12, 15 April 2013

This topic covers the internal architecture of a Model 204 Table B page.

For a discussion of the ways a File Manager may organize these pages in a file, please refer to File Design (File Management).

At a minimum, Table B contains all of the base records in a Model 204 file. If Table X is not enabled it also contains all extension records. If Table E is not enabled, then any data whose contents is greater than 255 bytes must be held as a series of repeating fields.


The structure of a Table B page

Not shown is a 4 byte 'Reuse Queue Page Number' for Unordered Files. If it is present, it is in the lower left hand corner ('before' (working backwards) the first record on the page).


Each of the items in the chart are described, below:

Pointers

Free Space Pointer

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).


Record Pointer Array

There are up to BRECPPG record pointers. These are not physically put onto the page until the record is being added to the file.

Up to 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.

For Enhanced Data Handling FILEORG x'100' files, with RECRDOPT set to x'01', 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.


Space Management

Space Management Across Pages

Extension Records

Refer to Records and Adding Records for a full discussion of record architecture.


Table B Segments

Definition

As discussed below, bit maps are used

Importance of and Use

INCREASE command boundaries

Use in Indexing

===

The Reuse Queue




The following Parameters relate to the Use of Table B

This table excludes the parameters used for 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).

Also not shown are the parameters which control the automatic increase in table size, which see.

BHIGHPG parameter Table B highest active page. Normally the high water mark of pages
used (except for Hash Key and Sorted files). Viewable only.
BQLEN parameter The number of pages in the reuse queue. Viewable only.
BRECPPG parameter The maximum number of record slots on a Table B page.
BRESERVE parameter Table B Reserved space.
BREUSE parameter The minimum amount of space necessary to add a page to the reuse queue.
BREUSED parameter The numberof record slots reused.
BRLIMSZ parameter Base record size maximum. Viewable only.
BSIZE parameter The number of pages in Table B.
RECRDOPT parameter Record storage options.