You are here: Functions > FIND()

FIND()

You can use FIND() function to test for the presence of a string of characters in the entire record or in one or more specified fields (numeric, character or date). The FIND() function returns a true value if the string is found and a false value otherwise.

The FIND() function is case-insensitive (finds matches in upper, lower and mixed cases) and searches for either ASCII or EBCDIC characters based on the field definitions. The FIND() function only checks the appropriate character set based on the field definitions when using a record search (previously checked both ASCII/EBCDIC). This is consistent with how the TEST() function also works.

Note: For searching non-character fields, Analyzer bases its string search on GLOBAL DISPLAY RULES. See Customizing Analyzer for more information.

In addition, you can use the FIND() function similar to how you use the Smart Search in the View. This means you can search for multiple concurrent strings (separated by blanks) in a record or in specific columns within a record.

For more information, see Smart Search in the View. Additionally, see SMARTSEARCH() for similarities and differences between the FIND() and SMARTSEARCH() functions.

Finally, you can use the FIND() function to perform a Google search for a literal which contains blanks by surrounding the literal string with double quotes. This means you must also surround the entire string with single quotes.

FIND() functionality is also offered using the LISTFIND() function which allows you to find a list of items easily. For more information see LISTFIND().

For an alternative to using the FIND() function, see Whole Word Searches.

Function Format

Finding a Single String in a Record

Finding Multiple Strings in a Record

Finding a Single String in a Field or Fields

Finding Multiple Strings in a Field

Finding Literal Strings Containing Blanks

Additional Issues to Consider