Table A (File architecture): Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 25: Line 25:
Even a number of 4000 or less might not actually be reached because of wasted entries (where ASTRPPG is defined as too large, you cannot fit the full number on any page) or due to vagaries of the hashing algorithm.
Even a number of 4000 or less might not actually be reached because of wasted entries (where ASTRPPG is defined as too large, you cannot fit the full number on any page) or due to vagaries of the hashing algorithm.


=== Enhanced Data Handling files (FILEORG x'100' files) ===
=== Enhanced Data Handling files (FILEORG X'100' files) ===


With the introduction of X'100'files (in version 7.5 of Model 204) the maximum number of fields (<var>[[ASTRPPG parameter|ASTRPPG]]</var> * <var>[[ATRPG parameter|ATRPG]]</var>) 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.
With the introduction of X'100' files (in version 7.5 of Model 204) the maximum number of fields (<var>[[ASTRPPG parameter|ASTRPPG]]</var> * <var>[[ATRPG parameter|ATRPG]]</var>) has been increased to 32000.  


Where the maximum number of fields exceeds 4000, no fields may be defined as <var>[[Field Design (File Management)#KEY and NON-KEY attributes|KEY]]</var> or <var>[[Field Design (File Management)#NUMERIC RANGE and NON-RANGE attributes|NUMERIC RANGE]]</var>, or <var>[[Field Design (File Management)#FOR EACH VALUE (FRV) and NON-FRV attributes|FOR EACH VALUE]]</var>.
In order to support this increase as well as the additional attributes, the field code has been increased from 2 to 3 bytes.
 
Where the maximum number of fields exceeds 4000, no fields can be defined as <var>[[Field Design (File Management)#KEY and NON-KEY attributes|KEY]]</var>, <var>[[Field Design (File Management)#NUMERIC RANGE and NON-RANGE attributes|NUMERIC RANGE]]</var>, or <var>[[Field Design (File Management)#FOR EACH VALUE (FRV) and NON-FRV attributes|FOR EACH VALUE]]</var>.


== MANY-VALUED and FEW-VALUED pages ==
== MANY-VALUED and FEW-VALUED pages ==

Revision as of 21:15, 16 May 2013

Table A contains three structures:

A dictionary of the fieldgroup / field names and their attributes.

Some attributes (notably 'CODED') require sets of values to be maintained. These values are stored either in the FEW-VALUED or MANY-VALUED attributes structures.

Table A usually is small in relation to the rest of the file.

Internal File Dictionary

Defined by the ATRPG.

The internal file dictionary is a hashed file where each page contains up to ASTRPPG field or field group definitions.

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

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 $FDEF or $LSTFLD functions.


Non FILEORG X'100' Files

The maximum number of fields (the product of ASTRPPG * ATRPG) in any Model 204 file is 4000.

Even a number of 4000 or less might not actually be reached because of wasted entries (where ASTRPPG is defined as too large, you cannot fit the full number on any page) or due to vagaries of the hashing algorithm.

Enhanced Data Handling files (FILEORG X'100' files)

With the introduction of X'100' files (in version 7.5 of Model 204) the maximum number of fields (ASTRPPG * 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 3 bytes.

Where the maximum number of fields exceeds 4000, no fields can be defined as KEY, NUMERIC RANGE, or FOR EACH VALUE.

MANY-VALUED and FEW-VALUED pages

If a field has the CODED or 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 (MANY-VALUED is the default).

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.

Parameters related to the use of Table A

ASIZE parameter A view-only parameter containing the size of Table A (the sum of ATRPG + FVFPG + MVFPG).
ASTRPPG parameter The maximum number of field / RFG definitions per page, or maximum number of field values per page in either the FEW-VALUED or MANY-VALUED section of Table A.
ATRPG parameter The number of pages containing field / RFG definitions.
FVFPG parameter The number of pages containing FEW-VALUED field values.
MVFPG parameter The number of pages containing MANY-VALUED field values.