CLEARFILE

CLEARFILE


CLEARDATA Index Level CLEARSELECT
Syntax CLEARFILE {file.variable}  
Category BASIC
Type Statement
Description deletes all items in the specified file.variable previously opened with an "open" statement.

The default file.variable is cleared if no file.variable is specified. This statement works like the TCL "clear-file" command.
The file is not deleted, but all non-file type items within the data file or dictionary are deleted. The file retains its same base and modulo. If "dict" is specified in the "open" statement that defines the "file.variable", the dictionary of the file is cleared.  If "data" is specified in the associated "open" statement, the data section of the file is cleared. If neither is specified in the associated "open" statement, the data section of the file is cleared.
Options
See Also statements & functions default file variables file.variable OPEN clear-file variables BEGIN WORK
Example
Warnings Once started, it clears the file to completion.  There are no second chances.
Compatibility D3 7.0 AP R83
CLEARDATA Index Level CLEARSELECT