Deleting Files

The DELETE-FILE Processor can be used to delete:

The DELETE-FILE processor removes the D-pointer that references the file and releases the frames occupied by the file. Obviously, any command that removes data from the system should be used with care. You should only remove files for which you have a backup.

The DELETE-FILE processor does not delete files that are referenced by Q-pointers. You can delete only files that are referenced by D-pointers. You can delete the File Synonym item in your Master Dictionary (using the DELETE command), but you cannot delete the file itself. In fact, you might want to remove all Q-pointers to a file that you are going to delete, as those synonyms will no longer point to a valid file.

DELETE-FILE may not be used when Update Logging is off and the Transaction Queue contains entries.

Format

DELETE-FILE [DICT | DATA] [dict-name ,]filename [(R)]

If no modifiers are specified, filename identifies the file dictionary and all of its associated data files. For example, if PERSONNEL is a dictionary shared by two data files, the following command deletes the dictionary and both of the data files:

>DELETE-FILE PERSONNEL

No message is returned when the command has finished successfully.

If only one of the data files were to be deleted, the following command would be used:

>DELETE-FILE DATA PERSONNEL,NIGHT.SHIFT

The D-pointer NIGHT.SHIFT in the PERSONNEL dictionary is removed and the space occupied by the data file is returned to overflow area.

The DICT modifier is used to delete a file dictionary. Deleting just the dictionary is not permitted if it contains any D-pointers. In other words, all of its associated data files must be deleted before you can delete the dictionary. The DATA modifier is used to delete a single data file. If the data file and the file dictionary do not have the same name, then you must also specify the dictionary.

The R option may be used to delete a file from another account (SYS3 privileges required).

See Also

Overview of File Management Commands

File Name Syntax

Item Lists

Creating Files

Creating mvBASIC Files

Copying a File

Clearing a File

Copying File Items

Editing Items

Deleting Items