EXCLUDE/XX primary command
The EXCLUDE primary command excludes records from display in an editor session. (Not available in SNGL display format.)
The XX command displays an Extended Command Entry panel, in which you can enter long arguments that may not otherwise fit within the Command line.
EXCLUDE commands are cumulative; each successive EXCLUDE command increases the number of records already excluded.
Syntax
- * (asterisk)
- Uses the search string specified on the previous EXCLUDE command as the search string.
- string
- The search string you want to search for. Records containing this
string, within the limits imposed by the other EXCLUDE command parameters,
are excluded. The string can be:
- A character string not starting or ending with a quotation mark
and not containing any embedded blanks or commas. The case of the
string is ignored. Uppercase and lowercase representations of the
same character match. For example,
Mixed
matchesMIXED
. - A character string enclosed in quotation marks. The string can
contain blanks and commas. The case of the string is ignored. For
example,
'Exact string'
matches'exact string'
. - C followed by a character string enclosed in quotation marks (C'Frog'),
or a character string enclosed in quotation marks followed by
C
('Frog'C). The string can contain blanks and commas. The string must match exactly (including case). For example,C'Exact string'
does not matchC'exact string'
. - P preceded or followed by a picture string enclosed
in single or double quotation marks to describe a type of string to
be found rather than the exact characters. It can contain blanks,
alphabetic and numeric characters which represent themselves, or any
of the special characters listed here, each of which represents a
class of characters:
- =
- Any character.
- @
- Alphabetic characters.
- #
- Numeric characters.
- $
- Special characters.
- & notsym;
- Non-blank characters.
- .
- Invalid characters.
- -
- Non-numeric characters.
- <
- Lowercase alphabetics.
- >
- Uppercase alphabetics.
Examples of picture strings used with the EXCLUDE command:
ex p'.' 73 80
- Exclude invalid characters in columns 73 to 80.
ex p'###'
- Exclude 3-digit number (for example, 101 but not 99).
ex '@1'p 1
- Exclude label a1,b1,c1, (and so on) in column 1.
ex p'<'
- Exclude the next lowercase alphabetic character.
ex p'¬' 72
- Exclude the next non-blank character in column 72.
When this notation is used, numeric, bit and Unicode fields (for SNGL and TABL display formats) are excluded from the search process.
- X followed by a hexadecimal string enclosed in quotation marks
(X'C1C2'), or a hexadecimal string enclosed in quotation marks followed
by
X
('C1C2'X). - A numeric value (only when, in SNGL or TABL display format, you limit the search by specifying field references, and only when the field being searched is a numeric field). For details, see Searching numeric fields.
- A character string not starting or ending with a quotation mark
and not containing any embedded blanks or commas. The case of the
string is ignored. Uppercase and lowercase representations of the
same character match. For example,
- ALL
- Searches all records from the top of data to the bottom. Note:
- The EXCLUDE command does not affect suppressed or not-selected records that are hidden from display or represented by shadow lines, even when you specify the ALL parameter.
- The command EXCLUDE ALL (with no other parameters) excludes all displayed records.
- FIRST
- Searches from the top of data for the first occurrence of string.
- LAST
- Searches backwards from the bottom of data for the last occurrence of string.
- NEXT
- Searches forwards from the cursor position (if the cursor is within the data portion of the screen), or from the beginning of the topmost record displayed on the screen, for the next occurrence of string in a record that is not already excluded.
- PREV
- Searches backwards from the cursor position (if the cursor is within the data portion of the screen), or from the beginning of the topmost record displayed on the screen, for the next occurrence of string.
- PREFIX
- Matches the search string wherever it appears as a prefix in the data. To be a prefix, the matched text must be preceded by a non-alphanumeric character or be the start of a line or field, and must be followed by an alphanumeric character.
- SUFFIX
- Matches the search string wherever it appears as a suffix in the data. To be a suffix, the matched text must be preceded by an alphanumeric character, and must be followed by a non-alphanumeric character or be the end of a line or field.
- WORD
- Matches the search string wherever it appears as a word in the data. To be a word, the matched text must be preceded by a non-alphanumeric character or be the start of a line or field, and must be followed by a non-alphanumeric character or be the end of a line or field.
- col1
- The first column to be included in the range of columns to be
searched. Must be greater than or equal to 1, and less than or equal
to the maximum record length. When column ranges are specified and
the data is displayed in SNGL or TABL formats, the search is performed
in the order that the data occurs, which may not be the order in which
the fields are displayed.
When column ranges are specified in SNGL or TABL display format, then a string comparison is performed, even for numeric fields.
- col2
- The last column to be included in the range of columns to be searched. Must be greater than or equal to col1 and less than or equal to the maximum record length. If not specified, the string is matched with data starting in the col1 location for the length of the string.
- #ALL
- Each field is searched according to its template attributes.
- ref
- A field reference, specifying the field to be included in the
search, for example:
#3
. When the field is an item in an array, you must specify a subscript in parentheses to identify the occurrence that you want to use, for example:#5(3)
. If your field is part of a multi-dimensional array, you must specify a subscript for each dimension in the array, for example:#7(2,3)
.Multiple field references must either be enclosed in parentheses, or separated with commas but without any intervening spaces. For details, see Limiting the search to specified fields.
In SNGL or TABL display format, if you specify field references or do not specify a field reference or column range, when searching a numeric field, the search string is interpreted as a numeric value, and a numeric comparison is performed. When searching a character field, a string comparison is performed. That is, the search is performed based on the File Manager template attributes. For details, see Searching numeric fields.
- ref_1
- The first field reference of a range of fields. It cannot be subscripted. If the ref_1 field reference value is less than the lowest displayed field reference value, the lowest displayed field reference value is used.
- ref_2
- The last field reference of a range of fields. It cannot be subscripted.
If the ref_2 field reference value is greater
than the highest displayed field reference value, the highest displayed
field reference value is used.
The ref_1 and ref_2 field reference values must be separated by a hyphen (-). Spaces are permitted between the hyphen and the field reference values.
If ref_1 is a higher value than ref_2, the search process reverses the operands.
- label1
- Label identifying the start of a range of records. The label must start with a period (.) followed by one to four alphabetic characters (no numeric or special characters). Labels starting with the letter “Z” indicate an editor-assigned label.
- label2
- Label identifying the end of a range of records. The label must start with a period (.) followed by one to four alphabetic characters (no numeric or special characters). Labels starting with the letter “Z” indicate an editor-assigned label.