If a hit is found then this format of the @ON statement deletes the hit string when the line content or string variable is being searched through. In this case, the remaining content of the work file lines or string variables is retained.
Operation | Operands | F mode, L mode |
@ON | { lines | svars } [,...] [:cols[:] ] D ELETE [ A LL] [ F ] [ R ] [ P ATTERN]search [,int] |
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 | All the hit strings in a line are deleted. If |
F | In each specified line range, hit strings are only deleted in the first line |
R | The lines are searched through from right to left. If |
PATTERN search | The wildcards present in the search term are interpreted. 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.
Example
The lines in the entire work file are to be searched through from right to left for the string XXXYYYZZZ
. The first time the search term occurs, the string is to be deleted and the search terminated.
In line 1, the first occurrence of the search term when searching from the right was found starting at column 29.
Next, every occurrence of the search term XXXYYYZZZ
is to be deleted throughout the entire work file.