EXCLUDE primary command

The EXCLUDE primary command excludes from display certain rows in the data being viewed, browsed, or edited.

You can only use the EXCLUDE primary command in TABL display format.

To redisplay excluded rows, enter the command:
RESET

Syntax


1 EXclude
1 X(1)
column list or range

1 ! #ALL
2.1 (+ , col_num)
1 (+ , col_num_1 - col_num_2)
label range

1!  .ZFIRST .ZLAST
1?  label1 label2
Notes:
  • 1 You can specify parameters in any order.
* (asterisk)
Uses the search string specified on the previous EXCLUDE command as the search string.
string
The search string you want to search for. Rows 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 single 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 string” matches “MIXED string”.
  • A character string enclosed in single 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, “Exact string” does not match “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'.' #4
    Exclude invalid character in column 4.
    ex p'###'
    Exclude 3-digit number.
    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'¬' #2
    Exclude the next non-blank in column 2.

    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 single quotation marks For example, X'C1C2'.
  • A numeric value (only when you limit the search by specifying column numbers, and only when the column being searched is a numeric column).
NEXT
This is the default setting. Causes the search to begin at the cursor location (if the cursor is within the data portion of the display) or the beginning of the first row displayed, and searches ahead to find the next occurrence of string in a row that is not already excluded.
ALL
Causes the search to begin at the top of the data and find all occurrences of string. If not specified, the search begins at the cursor location (if the cursor is within the data portion of the display) or the beginning of the first row displayed, and searches ahead to find the next occurrence of string in a row that is not already excluded.

The command EXCLUDE ALL excludes all displayed rows.

FIRST
Causes the search to begin at the beginning of the table and search ahead.
LAST
Causes the search to begin at the end of the table and search backwards.
PREV
Causes the search to begin at the cursor location (if the cursor is within the data portion of the display) or the beginning of the first row displayed, and searches backwards to find the string.
CHARS
Matches the search string anywhere in the data.
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.
#ALL
Each column is searched according to its template attributes.
col_num
The Db2® column number (specified as #n) of a column to be included in the data search. Multiple column numbers must be separated by a comma or, if enclosed in brackets, separated by a blank or comma.
col_num_1
The first field reference of a range of fields. It cannot be subscripted. If the col_num_1 field reference value is less than the lowest displayed field reference value, the lowest displayed field reference value is used.
col_num_2
The last field reference of a range of fields. It cannot be subscripted. If the col_num_2 field reference value is greater than the highest displayed field reference value, the highest displayed field reference value is used.

The col_num_1 and col_num_2 field reference values must be separated by a hyphen (-). Spaces are permitted between the hyphen and the field reference values.

If col_num_1 is a higher value than col_num_2, the search process reverses the operands.

label1
Label identifying the start of a range of rows. 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 rows. 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.

Availability

Related tasks