This format of the @ON statement causes EDT to delete the line or the content of a string variable which contains the search term. In this case, string variables are reinitialized with a blank and contain the character set EDF041
.
Operation | Operands | F mode, L mode |
@ON | { lines | svars } [,...] [:cols[:] ] F IND [ A LL] [ F ] [ R ] [ NOT ] [ P ATTERN] search [,int] DELETE |
lines svars | One or more line ranges in which the search is to be performed. One or more ranges of string variables in which the search is to be |
cols | Contiguous column range to which the search is to be limited. If the range specification contains only a single column specification, this If no column range is specified then the column range specified with |
ALL | Although the specification is permitted, it serves no purpose since a line is |
F | Only the first hit line in each specified line range is deleted. If |
R | This specification is pointless since whether or not hits are found in a work |
NOT | A line is deleted if the search term is not found in the specified column range |
PATTERN | The wildcards present in the search term are interpreted. |
search | Search term that is to be searched for in the search range (for details, see |
int | Only the |
If the statement is interrupted with [K2] and the EDT session is continued with /INFORM-PROGRAM
then the processing of the statement is aborted and message EDT5501
is output.
Note
All the empty lines (records of length 0) in a range can be deleted using the statement @ON lines FIND NOT PATTERN '/' DELETE if '/'
is the wildcard that stands for precisely one character.
Example
All the lines in the work file that contain three or more occurrences of the string ABC
are to be deleted.
Lines 1, 2 and 3 have been deleted. Next, all the lines in the entire work file in which the character A
occurs after column 7 are to be deleted.
Line 4 has been deleted. Next, all the lines in the entire work file which contain two consecutive blanks ’'BLANK''BLANK'
’ are to be deleted.
Line 5 has been deleted.