Previous Topic: Information about CommandsNext Topic: Use the FIND PF Key


FIND Command—Find Information on a Display

Use the FIND command for locating information that is on a display. The FIND command searches the display data for a specified character string.

Note: The DUMP command has its own FIND subcommand. For information about issuing FIND from the DUMP display, see the DUMP command in online help.

The FIND command has the following format:

FIND {string}[,keyword1][,keyword2][,col1][,col2][,fieldname]
string

This required parameter specifies the string that you want to find. If a string contains embedded blanks or commands, it must be contained in character delimiters. The default character delimiter is the apostrophe ('). You can change this default in your profile.

The following formats qualify a string:

Example: The following command finds the string JOB1:

FIND JOB1

The string parameter must be specified before you can specify any of the other parameters.

keyword1

This first keyword finds multiple occurrences of the string. Values of keyword1 are NEXT, PREV, FIRST, LAST, and ALL.

Example: Find a previous occurrence of the string JOB1, specify the following command:

FIND JOB1 PREV

When you use the value ALL for keyword1, the command:

  1. Searches for all occurrences of the string
  2. Positions the display at the first occurrence

To see the remaining occurrences, repeat the FIND command (without any parameters). By default, you can use the FIND PF key to repeat the find.

keyword2

This second keyword finds all occurrences of a string according to its position in a word. Values of keyword2 are CHARs (ignores the position), PREfix (beginning of a word), SUFfix (end of a word), INFIX (middle of a word).

Some examples of the previous keywords follow. The capitalized characters indicate the strings that are found.

FIND 'DO' CHAR  DO DOnt aDO aDOpt 'DO' +aDO (DOnt) aDO-
FIND 'DO' PRE   do DOnt ado adopt 'do' +ado (DOnt) ado-
FIND 'DO' SUF   do dont aDO adopt 'do' +aDO (dont) ado-
FIND 'DO' WORD  DO dont ado adopt 'DO' +ado (dont) ado-
FIND 'DO' INFIX do dont ado aDOpt 'do' +ado (dont) ado-
col1 and col2

Specify to find a string in a column that these column numbers defined.

Note: To see column numbers on your display, specify SET COLS ON at the command line.

To find the string 3658 between columns 42 and 48, specify:

FIND 3658 42 48
fieldname

Specify to find a string in a column defined by a field on the display.

To find the string 3658 in the Jobnr field, specify:

FIND 3658 Jobnr