DELETE (DEL)


In Character mode and Vertical Formatted mode edit, the DELETE command deletes a line, a specified number of consecutive lines, or a block of lines from the edit data set. In formatted edit, the DELETE command deletes the currently displayed record from the data set. Use DELETE without parameters to delete the currently displayed record in formatted edit. Using DELETE in character and vertical formatted edit without parameters produces the message: ENTER DELETE.

The command is available in the Edit function in all modes and for specifying formatted selection criteria in the Selection Criteria function.

image2021-6-3_10-48-15.png

lrange

Optionally confines the scope of the DELETE command to the specified line range. A line range may be specified with one or two line labels. Use user-defined line labels, system-defined labels (.ZFIRST, .ZLAST, or .ZCSR), or line numbers in any combination preceded by a period (.). When two labels are used, the two labels may be listed in either order. The line range is always considered to begin at the label occurring first in the data set. To confine the scope of the command to a single line, specify the same label twice, or specify a single line label.

If the ALL X or ALL NX parameter is not specified, the lrange parameter is required. All lines in the specified range are unconditionally deleted.

ALL X

Causes all excluded lines within the specified line range to be deleted. If the lrange parameter is not used, all excluded lines in the entire data set are deleted. Lines may be excluded with the EXCLUDE primary command or the X (exclude) line command.

ALL NX

Causes all nonexcluded lines within the specified line range (or the entire data set) to be deleted.

Guidelines

Omitting the keyword ALL from the X or NX parameter produces the message: INCOMPLETE DELETE.

Character and Vertical Formatted Modes

The following character and vertical formatted DELETE example deletes all lines that contain a three-byte packed data field with a value of 17 in column one:

RESET  X
EXCLUDE  ALL  PL3'17'  1
DELETE  ALL  X
  • The RESET command assures that no lines are excluded prior to entry of the EXCLUDE command.
  • The EXCLUDE command causes the selected lines to be excluded.
  • The DELETE command causes all excluded lines to be deleted from the edit data set.

Formatted Mode

One record is removed each time the DELETE command is used. Simultaneous deletion of multiple records is not permitted.

After a record is deleted, the record that immediately follows is displayed. When the last record in the data set is deleted, the preceding record is displayed.

Use the DELETE command after the INPUT command to:

  1. Discard data entered in the current INPUT record.
  2. Terminate the INPUT command.
  3. Display the record following the record from which the INPUT command was invoked.

See INPUT-INSERT-I for more information on using the INPUT command.

Using the DELETE command while editing a MASK line produces the message: NOT VALID FOR MASK LINE.

Selection Criteria

In the Formatted Selection Criteria screen, the DELETE command deletes the currently displayed criteria set or subset.

The set or subset preceding the deleted set or subset becomes the current criteria set or subset. When deleting the first set or subset, then the following set or subset is displayed. If the deleted criteria was the last (and only) formatted criteria, all conditions are cleared and the entry (SET 1 OF 1) is re-initialized.

Additional operands are not allowed.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*