Once you have determined that a file or an account needs a new modulo, it is easy to reallocate its space. To change a file’s modulo, simply enter the new number in Attribute 13 of its File Definition item or Account Definition item. It must be enclosed in parentheses. To reallocate the items in the file, you can either perform an account-save or filesave followed by an account or file-restore; or you can copy the data from the file to be reallocated to a newly created file with the correct modulo. Procedures for both of these methods follow.
The most commonly used method for reallocating files is to back up and restore either the account containing the file or the entire data area:
Change the modulo by entering the new modulo, enclosed in parentheses, in Attribute 13 of the File Definition item or Account Definition item.
Back up either the account containing the file (with ACCOUNT-SAVE) or the entire data area (with FILE-SAVE). See Backing Up Files in the Guide to mvBase Files and Accounts for more information about backing up and restoring files.
Restore either the account (with ACCOUNT-RESTORE) or the data area (with :FILELOAD). The file or account will be restored with the new modulo, and all files will be reallocated in one block of contiguous space.
The following method, using the COPY processor, is less common and may not be practical for large files (for example, due to lack of enough disk drive space):
Using CREATE-FILE, create a temporary file with the new modulo.
Using COPY, copy the contents of the file you want to reallocate in the temporary file.
Delete the original file with DELETE-FILE.
Using RENAME, rename the temporary file with the original file name.
See Also