DELETE (records) primary command

When editing a data set or data set member, the DELETE primary command deletes records.

Syntax

Figure 1. Syntax (CHAR, HEX, LHEX or TABL display format)
(1)
Notes:
  • 1 If none of these parameters (X, EX or NX) is specified, then the DELETE command applies to both excluded and not-excluded records.

In SNGL display format, DELETE deletes the current record.

Figure 2. Syntax (SNGL display format)

1 DELETE
1 DEL
ALL
Causes the DELETE command to delete all records (or all excluded or not-excluded records) within the specified range of records (or within the entire data set, if you do not specify a range).

If you do not specify the ALL parameter, then the DELETE command deletes only the first record (or only the first excluded or not-excluded record) within the specified range.

Note: Suppressed or not-selected records that are hidden from display or represented by shadow lines are not affected by the DELETE command, even when the ALL parameter is specified.
EX
Excluded records only.
label1
Label identifying the start of a range of records. The label must start with a period (.) followed by one to four alphabetic characters (no numeric or special characters). Labels starting with the letter “Z” indicate an editor-assigned label.
label2
Label identifying the end of a range of records. The label must start with a period (.) followed by one to four alphabetic characters (no numeric or special characters). Labels starting with the letter “Z” indicate an editor-assigned label.
NX
Not-excluded records only.
X
Same as EX.

Availability

Related tasks and examples