This format of the @ON statement causes EDT to output the content of each line or string variable in which a hit is found. In interactive mode, the output is written to SYSOUT
and in batch mode it is written to SYSLST
.
Operation | Operands | F mode, L mode |
@ON | {lines | svars} [,...] [:cols[:]] P RINT [ A LL] [ F ] [ R ] [ NOT ] [ P ATTERN] search [,int] [S] [N] [E] |
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 | The |
F | Only the first hit line in each specified line range is output. If |
R | The lines are searched through from right to left. If If |
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 |
S | The empty line which precedes the first line for output is omitted. This |
N | The hit lines are output without an associated line number. Equally, no string |
E | The hits are highlighted when the hit lines are output on screen. If both This operand is only effective if If inserting the terminal control characters in the line that is to be output |
Example
The first line containing the string HIT
is to be output.
All the lines containing the string HIT are to be output. The first located hit string is then to
be written to line 100.
If there is more than one hit then the contents of the line number variable #L0
and the integer variables #I0
and #I1
apply to the first detected hit, i.e.. HIT
in line 2.
All the lines which contain the string HIT
after column 2 are to be output.
The lines which contain the string UT at least twice are to be output.
All the lines which do not contain the string HIT
are to be output.