FD - File Delete

Deletes an item from the disk file and returns control to TCL.

Caution

When using this command, you need to be aware of the effects of any file triggers that might be run as a consequence. See File Triggers for more information.

Syntax

FD{K}{O}

Syntax Elements

K indicates that you wish to terminate the item list.

O indicates that you wish to suppress the double check message.

Double Check Message

Before the Editor deletes the item, it displays the following message:

-FD? Sure (Y/N)?

To delete the item, type Y  and press RETURN. To cancel the FD command (retain Editor control), press RETURN only, or type N and press RETURN. To suppress this message, use the O parameter.

This message does not display if the Editor is invoked by the Proc processor.

Message for a Deleted Item

When the item has been deleted, the following message is displayed:

'item-id' deleted from file 'file-name'.

Note that FD does not delete files; it deletes individual items. You must use the TCL command DELETE-FILE to delete files.

How to Exit From an Item List

To terminate a multiple item editing session after you delete an item but before you edit the last item in the list, use the FDK command.

Recovering Mistakenly Deleted Items

Recovery of mistakenly deleted items is discussed in the description of the RECOVER-FD command.

Example 1 - FD

:ED TEST T1 T2 T3
T1
Top
.FD

-FD? Sure (Y/N)?Y
'T1' deleted from file 'TEST'.
T2
Top
.




Request to delete item T1.

You are prompted to confirm the deletion. Entering Y deletes the item.

Example 2 - FDK

:ED TEST T1 T2 T3
T1
Top
.FDK

-FD? Sure (Y/N)?Y
'T1' deleted from file 'TEST'.

:




Request to delete item T1 from an item list and return to TCL.
You are prompted to confirm the deletion. Entering Y deletes the item and returns control to TCL.

Example 3 - FDO

:ED MD T3
Top
.FDO
'T3' deleted from file 'MD'.

:



Request to delete item T3. No prompt is displayed. Item T3 is deleted.