EXCLUDE—Exclude Lines from the Display
The EXCLUDE primary command hides lines that contain a search string from view and replaces them with a dashed line. To see the lines again, you enter either the FLIP, RESET or RESET EXCLUDED command.
Syntax
- string
- The search string you want to exclude. See Finding, seeking, changing, and excluding data.
- labela, labelb
- Labels identifying the start and end of the group of lines which
the EXCLUDE command is to search.
For more information about using labels to identify a group of lines, see Labels and line ranges.
- NEXT
- Starts at the first position after the current cursor location and searches ahead to find the next occurrence of string.
- ALL
- Starts at the top of the data and searches ahead to find all occurrences of string.
- FIRST
- Starts at the top of the data and searches ahead to find the first occurrence of string.
- LAST
- Starts at the bottom of the data and searches backward to find the last occurrence of string.
- PREV
- Starts at the current cursor location and searches backward to find the previous occurrence of string.
- CHARS
- Locates string anywhere the characters match.
- PREFIX
- Locates string at the beginning of a word.
- SUFFIX
- Locates string at the end of a word.
- WORD
- String is delimited on both sides by blanks or other non-alphanumeric characters.
- start_col
- The first column to be included in the range of columns to be searched. When you specify only one column, the editor finds the string only if the string starts in the specified column.
- left_col
- Number of the first column the EXCLUDE command is to search.
- right_col
- Number of the last column the EXCLUDE command is to search.
- For more information about restricting the search to only a portion of each line, see Limiting the search to specified columns.
- The EXCLUDE command allows you to control the starting point and the direction of the search by positioning the cursor and using either the NEXT or PREV operand. For more information, see Starting point and direction of the search.
Description
You can use the EXCLUDE command with the FIND and CHANGE commands to find a search string, change it, and exclude the line that contains the string from the panel.
To exclude the next non-excluded line
that contains the letters ELSE
without specifying
any other qualifications:
- On the command line, type:
EXCLUDE ELSE
- Press Enter. Since no other qualifications were specified, the
letters
ELSE
can be:- Uppercase or a mixture of uppercase and lowercase
- At the beginning of a word (prefix), the end of a word (suffix), or the entire word (word)
- Anywhere within the current boundaries
To exclude the next line that contains
the letters ELSE
, but only if the letters are uppercase:
- On the command line, type:
EXCLUDE C'ELSE'
- Press Enter. This type of exclusion is called a character string
exclusion (note the
C
that precedes the search string) because it excludes the next line that contains the lettersELSE
only if the letters are found in uppercase. However, since no other qualifications were specified, the exclusion occurs no matter where the letters are found on a non-excluded line, as outlined in the previous list.
For more information, including other types of search strings, see Finding, seeking, changing, and excluding data.
Examples
ELSE
.
However, the letters must occur on or between lines labeled .E and
.S and they must be the first four letters of a word: EXCLUDE ELSE .E .S FIRST PREFIX
ELSE
. However, the
letters must occur on or between lines labeled .E and .S and they
must be the last four letters of a word. EXCLUDE ELSE .E .S LAST SUFFIX
ELSE
.
However, the cursor must not be positioned ahead of the lines labeled
.E and .S. Also, the letters must occur on or between lines labeled
.E and .S; they must be standalone characters (not part of any other
word); and they must exist within columns 1 and 5: EXCLUDE ELSE .E .S PREV WORD 1 5