This format of the @ON statement is used to copy all the hit lines in the line ranges that are to be searched into the specified work file.
Operation | Operands | F mode, L mode |
@ON | lines[,...] [:cols[:] ] FIND [ALL] [F] [R] [NOT] [PATTERN] search [,int] [COPY [TO] ] (procnr) [KEEP] [OLD] |
lines cols | One or more line ranges in which the search is to be performed. 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 is pointless since a record can only |
F | Only the first hit line in each specified line range is copied. If |
R | This specification is pointless since whether or not hits are found in a line is |
NOT | A hit is identified if the search term is not present in the specified column |
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 |
procnr | The number of the work file ( An active work file or the current work file may not be specified. If |
KEEP | The line numbers of the hit records are retained on copying. If |
OLD | The content of the target work file is not deleted before the copy operation. |
If the specified work file has a character set then the lines that are to be copied are converted into this work file's character set. If characters which cannot be displayed in the work file's character set are identified then these characters are replaced by a substitute character provided that such a character has been specified (see @PAR SUBSTITUTION-CHARACTER); otherwise, the @ ON statement is rejected and error message EDT5453
is output.
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
Records which contain the search term STR
are to be copied into work file 5. Processing then branches to work file 5.
Processing branches to work file 1.
All the records corresponding to individuals whose first names start with M
and end with A
are copied to work file 6. Processing then branches to work file 6.