AFS-EXPAND

Expands an AFS file; that is, a data section or index that is configured for automatic file sizing.

Syntax

AFS-EXPAND file-specifier {index-name} {( [ B | percentage ]}

Syntax elements

file-specifierSpecifies the required data section or the data section containing the required index.

See General Conventions for the full syntax of file-specifier.

index-nameOptional. The name of the required index.

Options

BRun as a background process (recommended for expanding large files and indexes). A background AFS-EXPAND continues when the user logs off.

percentageThe percentage by which to expand the file or index. The default, if omitted, is to complete the current expansion - for example, if the data section or index currently has a modulo of 7 and a size of 11 groups, it will be expanded to 14 groups and the modulo will be doubled to 14.

Restrictions

Can only be run by the database owner.

Comments

When the number of groups in a file increases to twice its current modulo, the modulo is doubled.

You can stop AFS-EXPAND at any time provided the BREAK key has not been disabled. Press the BREAK key and then enter END  to exit the DataBasic debugger. Note that if you want to restart the expansion process, you will need to use the ISTAT command to find out how much of the expansion has completed.

AFS-EXPAND is not transaction logged.

Examples

The default data section of the AFS file MYAFSFILE has a current modulo of 126 and has expanded to 182 groups. This is then expanded by 50% as follows:

AFS-EXPAND MYAFSFILE (50

On completion, the file will have 273 groups and the modulo will have been doubled to 252.

If the file is then expanded without specifying a percentage, the number of groups will be increased to 504 and the modulo will be doubled (also to 504).

See also

AFS-CONTRACT.