Previous Topic: EXCLUDENext Topic: Rules for Finding Packed Strings on the FIND Command


FIND

Locates data or fields.

Syntax:

   FIND
      fromstr
      [FIRST|LAST|NEXT|PREV|ALL]
      [WORD|PREFIX|SUFFIX|CHAR|FIELD]
      [label1 label2]
      [lcol  rcol]
      [X|NX]

Syntax Description:

fromstr

Specifies the from string. Enter a string in one of the following formats:

Character

(C'ccc')

Text

(T'ccc')

Hex

X'xx'

Packed-decimal expression

P'ppp'

PL'vvv'

UTF-16 Character

(UC'ccc')

UTF-16 Text

(UT'ccc')

FIRST

Starts search at the beginning of the data set, and locates the first occurrence of fromstr.

LAST

Starts search at the end of the data set, and locates the last occurrence of fromstr.

NEXT

Starts from the current cursor position, and locates the next occurrence of fromstr.

PREV

Starts from the current cursor position, and locates the previous occurrence of fromstr.

ALL

Locates all occurrences of fromstr.

WORD

Locates only complete words in the fromstr.

PREFIX

Locates only words that begin with the fromstr.

SUFFIX

Locates only words that end with the fromstr.

CHAR

Locates the fromstr in any part of a word.

FIELD

Locates the fromstr in any part of a field name when displaying formatted records.

label1

Specifies the start point in a range of lines to which the FIND command is applied.

label2

Specifies the end point in a range of lines to which the FIND command is applied.

lcol

Specifies the leftmost column in which fromstr can appear. If rcol is not also specified, fromstr must begin in lcol.

rcol

Specifies the rightmost column in which fromstr can appear.

X

Only excluded lines should be searched.

NX

Excluded lines should not be searched.

Alias: F