FIND (Find String)


The FIND primary command locates strings matching a specified search criteria. In multiple column windows, the search can be limited to a specified column by selecting it with the cursor. Use the RFIND primary command to repeat execution of the FIND command.

image2021-4-28_11-0-7.png

The following example finds the next occurrence of XXXX:

   COMMAND ===> find XXXX

The cursor is placed at the beginning of the string. Automatic scrolling brings the string into view.

To specify a column to be searched, place the cursor on it before executing the FIND command. Optional parameters indicate the direction and starting point of the search (FIRST, LAST, NX, PREVIOUS, ALL).

string

Specifies the string of characters to be located. All characters in the search string and all characters in the data being searched are treated as uppercase. Enclose the string in quotes if it contains any of the following:

  • Special characters
  • Blanks
  • Any characters that could be misinterpreted as a keyword.

FIRST

Locates the next forward occurrence of the string. If the string is not currently displayed, File-AID for Db2 Object Administration scrolls the row to the top of the window.

LAST

Locates the last occurrence of the string in a forward search and scrolls the row to the top of the window.

NX

Locates the string without searching on excluded rows.

PREV

Locates the first backward occurrence of the string and scrolls the row to the top of the window.

ALL

Counts the occurrences of the string and displays the results in a message window.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*