User's Reference > General > TCL and General User Commands > Command Reference > C > CLEAR-FILE

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

CLEAR-FILE (TCL) (m604806+clearfile.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

CLEAR-FILE

Deletes all items (except D-pointers) currently stored in a specified dictionary or data section.

Command Class

TCL-I command.

Syntax

CLEAR-FILE file-specifier

Syntax Elements

file-specifier Specifies the file to be cleared; for syntax, see General Conventions. If the DICT file modifier is included, only the dictionary is cleared; otherwise, only the data section is cleared.

Restrictions

SYS1 privileges are requested to execute CLEAR-FILE.

You cannot clear an encrypted file unless your security profile gives you access to the encryption key.

Comments

After clearing the file, the disk space originally allocated when the file was created is retained. See also DELETE-FILE.

If DICT is specified, all items such as data definition items are deleted from the dictionary file, but not the data level descriptors. They are retained to point to the data sections.

Caution

Ensure that no users are using a file before clearing it; otherwise, you risk causing problems with read and update lock codes that might be in use. Do not use a file with GFEs.

When a data section that is configured for automatic file sizing is cleared, it is normally contracted to its initial modulo. However, if the current modulo is less than its initial value, the modulo is left unchanged.

RealityV15.1 (MoTW) Revision 7Comment on this topic