tcl.clear-file Verb: Access/TCL


Command tcl.clear-file Verb: Access/TCL
Applicable release versions: AP, R83
Category TCL (746)
Description clears the dictionary or data section of the specified file of all items and retains the primary file space area.

Clears data from the file specified by "file.reference". The file is only cleared, not deleted. The file retains its name, base, and modulo for both dictionary and data sections.

To clear the dictionary section, "dict" must be specified before the "file.reference". If "dict" is specified, file-defining items ("d-pointers") are not cleared.

If no "level" is specified, the default is "data".
Syntax clear-file {(}{data} file.reference{, file.reference}) {(option}
clear-file {(}dict file.reference) {(option}
Options c "Scrubs" each frame of the file's primary space, changing every byte in the frame to x'ff'.
n No logging. When this option is active, no log of the clear-file is placed in the file-of-files item. This can increase performance significantly on temporary files which are cleared frequently.
clear-file data old.invoices
Removes all items from the data level of the "old.invoices".

clear-file dict invoice.history
Removes all items except "d-pointers" to data sections from the 
dictionary of the "invoice.history" file.

clear-file data invoices,archive
Clears the "archive" data section located in the dictionary of the 
"invoices" file.
Related tcl.delete-file