DELETE-FILE Command

DELETE-FILE has four formats:

Format

DELETE-FILE filename  [(R)]

Deletes both the dictionary and all its associated data files.

DELETE-FILE DICT filename [(R)]

Deletes a file dictionary without deleting an associated data file.

DELETE-FILE DATA {filename | dict-name,data-name} [(R)]

Deletes a data file without deleting its dictionary.

DELETE-FILE M/DICT account-name

Deletes an account, including all of its dictionaries and associated data files.

Parameter(s)

DICT

Specifies the file dictionary.

DATA

Specifies a data file.

M/DICT

Specifies the system dictionary.

filename

Name of the file you want to delete.

account-name

Name of the account to delete.

dict-name, data-name

Full name of the file. Use this format to delete a data file that is one of multiple files associated with a single dictionary.

R

Deletes a file from another account (SYS3 privileges required).

Description

These rules apply when deleting files:

When you delete a file, the DELETE-FILE processor removes the File Definition item from the Master Dictionary and releases all frames allocated for the file.

CAUTION

Use this command with care. The system does not ask you to confirm the operation before it deletes the file.

Deleting a Dictionary and Its Data Files

SALES is a dictionary shared by multiple data files. You can delete the dictionary and all its associated data files with a single command:

>DELETE-FILE SALES

Deleting a Dictionary

This example deletes the dictionary of a file called PAYROLL. The data file must already have been deleted:

>DELETE-FILE DICT PAYROLL

Deleting a Data File

This example deletes a data file called INVENTORY:

>DELETE-FILE DATA INVENTORY

The next example deletes the data file INACTIVE, which is associated with the dictionary CUSTOMERS:

>DELETE-FILE DATA CUSTOMERS,INACTIVE

Deleting an Account

This example deletes an account called ORDERS:

>DELETE-FILE M/DICT ORDERS