DELETE

#### Search Results

Search

# DELETE

`DELETE` |  | [`TYPE` object-type ...] |  |  | `SOURCE` `OBJECT` `BOTH` |  |  | object-name |  |

This command is used to delete Natural objects from the Natural system file.

Note
The source currently in the editor's work area is not affected by the `DELETE` command.

See also Object Naming Conventions in the Using Natural documentation.

This document covers the following topics:

- DELETE Syntax Explanation

- Selection List

- Safeguard Against Accidental Deletion

- DELETE Examples

## DELETE Syntax Explanation

`object-name` | As object-name, you specify the name(s) of the object(s) to be deleted. In addition, you can specify whether only the source object, the corresponding cataloged object or both the source object and the cataloged object are deleted:
`SOURCE` | source object
`OBJECT` | cataloged object
`BOTH` | both source object and cataloged object. This is the default.
A `SOURCE`/`OBJECT`/`BOTH` specification applies for all subsequent object names that is, until the next `SOURCE`/`OBJECT`/`BOTH` specification. To delete all objects whose names begin with a specific string of characters, you can use asterisk notation for the object-name.
`object-type` | In conjunction with asterisk notation for the object-name, you can also specify an object-type if you wish to delete only objects of a specific type. The possible settings for object-type are the same as for the system command `EDIT`. In addition, you can specify the settings X (= global, local and parameter data areas) and U (= subprograms, subroutines and helproutines). Note If you specify the full names of individual objects, you need not specify their object types.

## Selection List

If you use asterisk notation, you will get a selection list, on which you then mark the object(s) to be deleted. For each object, you can determine whether to delete the corresponding source object (S), the corresponding cataloged object (O) or both objects, by marking the object with the appropriate letter `S`, `O` or `B`, respectively.

If you enter only the `DELETE` command itself, you will also get a selection list, containing all objects stored in your current library.

## Safeguard Against Accidental Deletion

As a safeguard against accidental deletion, a window will automatically be displayed in which you have to confirm the deletion of an object by entering its name.

If you have specified or selected more than one object, an additional window will be displayed in which you can specify whether you wish to confirm the deletion for each object individually or whether all specified/selected objects are to be deleted without confirmation.

## DELETE Examples

With this command, you delete three objects named `TOM`, `DICK`, and `HARRY`:

    DELETE TOM DICK HARRY

With this command, you delete the source object and the cataloged object `JOHN`, the source objects `PAUL` and `GEORGE`, and the cataloged object `RINGO`:

    DELETE JOHN SOURCE PAUL GEORGE OBJECT RINGO

With this command, you get a selection list of all objects in the current library:

    DELETE

With this command, you get a selection list of the source objects of all maps in the current library:

    DELETE TYPE M SOURCE *

With this command, you get a selection list of all global, local and parameter data areas in the current library which are stored as source objects and/or catalgoged objects and whose names begin with D:

    DELETE TYPE GLA D*

With this command, you get a selection list of all cataloged objects in the current library whose names begin with `YYZ`:

    DELETE OBJECT YYZ*

With this command, you delete the source objects and cataloged objects of the maps `TOM` and `DICK`, the source object of the map `HARRY`, the source object of the program `JOHN`, and the cataloged object `PAUL`:

    DELETE TYPE M TOM DICK SOURCE HARRY TYPE P JOHN OBJECT PAUL

### On this page

- DELETE Syntax Explanation
- Selection List
- Safeguard Against Accidental Deletion
- DELETE Examples