delete-file Command

The delete-file BASIC program releases all frames used by the specified file to the overflow table, and removes the file reference from the master dictionary of the current account.

Synonym-defining items (Q-pointers) cannot be deleted with this command. The account must possess the actual D-pointer to a file to be able to delete the file.

Syntax

delete-file file.reference {(option}

delete-file data file.reference {, file.reference} {(option}

Synonym(s)

df

Parameter(s)

option 

i

Cancels the delete if a file is open when the delete-file attempt takes place. The system displays file still open, delete canceled. Control returns to TCL or a calling program without prompting for input.

u

Deletes the file unconditionally, even if it is open at the time of the delete.

 

WARNING

  • The dictionary level cannot be deleted without first deleting any data sections that it may have pointers to.

  • If another user is still using the file, this command prints a warning message and asks if the user wishes to continue. If the delete is allowed to continue and another user is actively using the file, then the other user may abort and/or experience workspace corruption. Delete shared files with caution.

Example(s)

Deletes the dictionary and all data sections from the temp file.

delete-file temp

Deletes the temp data section from the temp dictionary, leaving the dictionary and any other data sections connected to the temp dictionary intact.

delete-file data temp

Deletes the temp data section from the customers dictionary.

delete-file customers,temp

See Also

begin work Statement, clear-file Command, close Statement, create-file Command, delete Command, delete-account Command, File Control Block, move-file Command, rename-file Command