Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@ON (format 1) - Output lines or string variables containing the search term

&pagelevel(3)&pagelevel

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
performed.

cols

Contiguous column range to which the search is to be limited.

If the range specification contains only a single column specification, this
indicates the range from the specified column through to the end of the line.
If the first column specification is greater than the line length then the line or
string variable is ignored.

If no column range is specified then the column range specified with
@SEARCH-OPTION is used.

ALL

The ALL operand only has an effect if the E operand is also specified. In this
case, all the hits in a line are highlighted. If ALL is not specified but E is, then
only the first hit in a line is highlighted.

F

Only the first hit line in each specified line range is output. If F is not
specified then all the hit lines in each specified line range are output. If both
F and E are specified then the first hit in the first hit line in each specified line
range is highlighted. If F, ALL and E are specified then all the hits in the first
hit line in each specified line range is highlighted.

R

The lines are searched through from right to left. If R is not specified then
they are searched through from left to right.

If R is specified but neither ALL nor F is then the minimum possible abbreviation
for PRINT is PR.

NOT

A hit is identified if the search term is not present in the specified column
range in a line (negative search). In this case, the ALL and E operands are
meaningless.

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
section “Searching with @ON”). It is not permissible to specify
an empty string.

int

Only the intth occurrence of the search term in a line is considered to
represent the first hit. Values between 1 and 32768 are permitted for int.
The default value for int is 1 byte.

S

The empty line which precedes the first line for output is omitted. This
operand only has an effect if the output is sent to SYSLST. If S is not specified
then the output begins with an empty line.

N

The hit lines are output without an associated line number. Equally, no string
variable names (#S00..#S20) are output if hits are searched for in string
variables. If N is not specified then the line numbers and the names of the
string variables are output.

E

The hits are highlighted when the hit lines are output on screen. If both E
and ALL are specified then all the hits in the hit line are highlighted,
otherwise only the first hit. If E is not specified then the hits are not
highlighted on output.

This operand is only effective if VTCSET ON is set; otherwise it is ignored.
When long lines are output, the system may interrupt the operation with a
%PLEASE ACKNOWLEDGE. If this occurs within a highlighted hit string then the
remainder of the string, which is displayed in the following screen, is not
highlighted.

If inserting the terminal control characters in the line that is to be output
would increase its length beyond 32768 characters then the insertion
operation is aborted and the hit strings in the remainder of the line are not
highlighted. The message EDT1248 informs the user of this.

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.