This format of the @ON statement causes EDT to output the line numbers and the numbers of the columns in which hit strings begin when searching in work files. In interactive mode, the output is written to SYSOUT
and in batch mode it is written to SYSLST
. If no search term is specified in the statement, EDT outputs the line numbers and the length of each line in the specified line range.
When the search is performed in string variables, the names and lengths of the string variables are output instead of the line numbers and line lengths. The length specifications indicate the number of characters in the lines or string variables.
Operation | Operands | F mode, L mode |
@ON | { lines | svars } [,...] [:cols[:]] CO LUMN [ [ALL] [F] [R] [PATTERN] 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 | Each time a hit string is found in a line, the value of the column at which the |
F | Only the column values for the first hit line in each specified line range are |
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 |
The output column values have five digits since the maximum number of characters that can be accommodated in a work file line or a string variable is 32768. A line of output may contain up to 10 column specifications followed by a line feed. The line number is not output in the continuation line.
Example
The lengths of all the lines are to be output.
The column at which the string ’E ’ occurs for the first time (searching from the right) is to be output.
All the columns in which the string 'E ' occurs in line 1 are to be output.
The column number of the hit (i.e. third occurrence of the search term E) is to be output for
all the lines which contain at least three occurrences of the string E.
All the lines and column numbers which contain the search term are to be output.