Recreating a Volume Directory (Media Map) (TB#58) (Performance)

Recreating a Volume Directory (Media Map)

The DOS and OS/2 operating systems have file naming conventions that are far more restrictive than those in Advanced Revelation. As a result, the name that you give to a file within Advanced Revelation is not the name that Advanced Revelation gives to the file at the operating system level. The operating system file name for any Advanced Revelation file consists of REV followed by a five-digit number. The relationship between Advanced Revelation file names and operating system file names is recorded in a special file known as the volume directory.

In both Advanced Revelation and the operating system, the file name for the volume directory is REVMEDIA. Every volume has its own volume directory. Through accident or misfortune, there may come a time when you need to rebuild your volume directory. This would be the case when, for example, you inadvertently copy one Advanced Revelation subdirectory on top of another (thereby overwriting one REVMEDIA file with another), or when you mistakenly delete the REVMEDIA.LK and REVMEDIA.OV files. In such cases it is easiest to recover the subdirectory by restoring from a recent backup. If this is not possible, follow these steps to manually rebuild your volume directory.

Note: You must know the Advanced Revelation file names for the files on the volume. If you recreate the volume directory with new file names, processes in your Advanced Revelation application that rely on the original file names (for example, windows and R/BASIC programs) will no longer function properly.

At the Operating System

In order to rebuild the directory, you need to determine which operating system files need to be included in the volume directory.

_ Delete the REMEDIA.LK and REVMEDIA.OV files, if they exist.

_ Print a directory listing of all .LK files in the subdirectory. At the operating system prompt enter:

DIR *.LK > PRN

_ From within Advanced Revelation Log in to the SYSPROG account and rebuild the directory by following these steps.

1. Create a new directory for the volume by using the NAMEVOLUME command: NAMEVOLUME C:\AREV\MYDATA JUNE011990 Warning! Each volume must have a unique name. If you give the same name to two volumes, you will not be able to attach both volumes at the same time.

2. Attach the volume directory:

ATTACH C:\AREV\MYDATA REVMEDIA

3. Build a browse list of records in the REVMEDIA file: EDIT REVMEDIA When the Edit window displays, go to the Records prompt and enter one record key for each .LK file in the subdirectory: F1*GLOBAL F2*GLOBAL F3*GLOBAL … F1, F2, etc. are temporary file names, and GLOBAL indicates that the files are in the GLOBAL account. Both the file and account names can be changed in step 7.

4. After all record keys are entered, press [F9] to activate the browse list. On line one of each record, enter an operating system file name from the printout of .LK files. Do not include the .LK extension. REV34591 [F9] to save each record and [Alt-F] to move to the next record. Repeat this step until you have created a record in the REVMEDIA file for every .LK file in the subdirectory.

5. When all records have been updated, exit the editor and attach the volume. ATTACH C:\AREV\MYDATA

6. For each file in the volume, examine the records in the file to determine what file it is and what account it belongs to. EDIT F1 *

7. Use the RENAMEFILE command to rename the file, giving it the correct file and account names:

8.

RENAMEFILE F1 SYSPROG SAMPLE_CUSTOMERS

Once all files have been renamed to their correct names, make a backup of the subdirectory.

  • kb/kb_articles/kb0044.txt
  • Last modified: 2024/01/30 13:36
  • by 127.0.0.1