filename.files File Synonym ("q-pointer")/Access: General, files Definition/General, files Definition/General

filename.files

Command filename.files File Synonym ("q-pointer")/Access: General
Applicable release versions: AP
Category Access: General (65)
Description "q-pointer" for the "file-of-files" file.

See "file-of-files".
Syntax
Options
Example
Purpose
Related filename.file-of-files
tcl.file-save

files

Command files Definition/General
Applicable release versions: AP, R83
Category General (155)
Description stored on disk in blocks called frames.

The frames are uniform in size, and are usually 512, 1024, 2048, or 4096 bytes. The primary file space physically consists of a contiguous set of disk frames. The beginning frame is the base frame and the number of contiguous frames or groups (including the base frame) is the modulo of the file. The modulo is defined at the time the file is created or resized. The system automatically adds or removes frames to or from groups as the amount of data within the group expands or contracts. The frames added automatically by the system are added to what is called the secondary file space. This means the user does not need to redimension a file as the amount of data in that file increases or decreases.

As items are added to the file, some groups require additional frames. These frames are allocated from Secondary File Space.

Frames within a group are explicitly linked together. Items are distributed to the various groups within a file based on a hashing algorithm that calculates the frame identification number (fid) of the first frame in the group. Items are distributed quasi-randomly between groups and sequentially within a group. The quasi-randomness is achieved by using the item-id directly in the hashing algorithm. Because of the nature of the mathematical relationship defining the hashing algorithm, modulo numbers that are multiples of 2 or 5 should not be assigned.

To enable data transfer to and from disk to occur at optimum efficiency, the user needs only to remember to set the modulo of the file to the nearest prime number above that required to set the number of frames per group below unity (50 to 75 percent utilization traded for single disk access speed, etc.) based on the amount of data storage anticipated.

This feature makes the system more efficient, in that the probability of two or more users accessing the same group at the same time is reduced because of the algorithm of data distribution between groups.

Number-of-Items X Average-size-of-Items (Bytes)
-----------------------------------------------
Frame-Size (Bytes)

The result should be increased to the next largest prime number. The frame size for a particular version of Advanced Pick can be determined by executing the "what" TCL command. The number of available bytes within a frame is listed on the first line of the report under "dfsize". The difference between "dfsize" and actual frame size is used to hold the frame linkages (forward and backward pointers).

When more than 50 percent of the groups have more than one frame, or the utilization gets below 50 percent, reallocate the files:

One brute-force method of resizing the file is:

1. Creating a new file with the desired modulo.

2. Copying all items from the old file into the new file.

3. Deleting the old file.

4. Renaming the new file to the old file name.

When resizing in this manner, the user must explicitly copy the index and other data from the old file's file-defining item to the new file's file-defining item before renaming all index and subroutine calls from the old file.

Files may also be reallocated using the system's "save" and "restore" processes. When the "save" and "restore" commands are used, the indexes are handled automatically. Prior to saving the system on magnetic media, attribute 13 of the file dictionary file-defining item may be set to the new modulo for that file. When the system is restored, all files will be reallocated according to the new modulo specified in attribute 13. When attribute 13 is not specified, the file is restored exactly as it was saved. The save and restore process allows reallocation of many files at one time.

"f-resize" is a program provided with the system to automatically calculate new modulos and mark attribute 13 of the files appropriately using the current statistics in the file-of-files as modified by the last "file-save".
Syntax
Options
Example
Purpose
Related tcl.create-file
tcl.rename-file
tcl.move-file
tcl.delete-file
tcl.steal-file
tcl.set-file
tcl.clear-file
tcl.copy
tcl.account-restore
tcl.account-save
tcl.f-resize

files

Command files Definition/General
Applicable release versions: AP, R83
Category General (155)
Description stored on disk in blocks called frames.

The frames are uniform in size, and are usually 512, 1024, 2048, or 4096 bytes. The primary file space physically consists of a contiguous set of disk frames. The beginning frame is the base frame and the number of contiguous frames or groups (including the base frame) is the modulo of the file. The modulo is defined at the time the file is created or resized. The system automatically adds or removes frames to or from groups as the amount of data within the group expands or contracts. The frames added automatically by the system are added to what is called the secondary file space. This means the user does not need to redimension a file as the amount of data in that file increases or decreases.

As items are added to the file, some groups require additional frames. These frames are allocated from Secondary File Space.

Frames within a group are explicitly linked together. Items are distributed to the various groups within a file based on a hashing algorithm that calculates the frame identification number (fid) of the first frame in the group. Items are distributed quasi-randomly between groups and sequentially within a group. The quasi-randomness is achieved by using the item-id directly in the hashing algorithm. Because of the nature of the mathematical relationship defining the hashing algorithm, modulo numbers that are multiples of 2 or 5 should not be assigned.

To enable data transfer to and from disk to occur at optimum efficiency, the user needs only to remember to set the modulo of the file to the nearest prime number above that required to set the number of frames per group below unity (50 to 75 percent utilization traded for single disk access speed, etc.) based on the amount of data storage anticipated.

This feature makes the system more efficient, in that the probability of two or more users accessing the same group at the same time is reduced because of the algorithm of data distribution between groups.

Number-of-Items X Average-size-of-Items (Bytes)
-----------------------------------------------
Frame-Size (Bytes)

The result should be increased to the next largest prime number. The frame size for a particular version of Advanced Pick can be determined by executing the "what" TCL command. The number of available bytes within a frame is listed on the first line of the report under "dfsize". The difference between "dfsize" and actual frame size is used to hold the frame linkages (forward and backward pointers).

When more than 50 percent of the groups have more than one frame, or the utilization gets below 50 percent, reallocate the files:

One brute-force method of resizing the file is:

1. Creating a new file with the desired modulo.

2. Copying all items from the old file into the new file.

3. Deleting the old file.

4. Renaming the new file to the old file name.

When resizing in this manner, the user must explicitly copy the index and other data from the old file's file-defining item to the new file's file-defining item before renaming all index and subroutine calls from the old file.

Files may also be reallocated using the system's "save" and "restore" processes. When the "save" and "restore" commands are used, the indexes are handled automatically. Prior to saving the system on magnetic media, attribute 13 of the file dictionary file-defining item may be set to the new modulo for that file. When the system is restored, all files will be reallocated according to the new modulo specified in attribute 13. When attribute 13 is not specified, the file is restored exactly as it was saved. The save and restore process allows reallocation of many files at one time.

"f-resize" is a program provided with the system to automatically calculate new modulos and mark attribute 13 of the files appropriately using the current statistics in the file-of-files as modified by the last "file-save".
Syntax
Options
Example
Purpose
Related tcl.create-file
tcl.rename-file
tcl.move-file
tcl.delete-file
tcl.steal-file
tcl.set-file
tcl.clear-file
tcl.copy
tcl.account-restore
tcl.account-save
tcl.f-resize