SEARCH

Top  Previous  Next

 

The SEARCH verb is similar to SELECT except that it also prompts for entry of one or more text strings. Records that meet any other selection criteria given on the command line are tested for the presence of the search strings at any position in the record.

 

SEARCH {DICT} file.name

{USING {DICT} file.name}

{selection.clause}

{sort.clause}

{record.id...}

{FOR string1 string2 ...}

{FROM select.list.no}

{STRINGS file.name record.id}

{SAVING {UNIQUE} {MULTI.VALUE} field.name {NO.NULLS}}

{TO select.list.no}

 

Multiple search strings may be specified. The default action is to prompt for entry of search strings, terminating the list by entering a blank response to the prompt. Two  alternative methods of specifying the search strings are available. Use of the FOR keyword allows search strings to be specified on the command line. Use of the STRINGS keyword takes the search strings from the specified file and record, each field being taken as a separate search string.

 

The optional NO.CASE keyword makes the search string test case insensitive.

 

By default, the SEARCH verb builds a list of all records that contain any of the supplied search strings. This can be changed by use of the ALL.MATCH or NO.MATCH keywords. The ALL.MATCH keyword specifies that the selected records must contain all of the supplied strings. The NO.MATCH keyword specifies that the selected records must not contain any of the supplied strings.

 

All other options of the SELECT verb may be used in SEARCH.

 

 

Example

 

SEARCH BP

String: !SORT

 

The above lines entered at the keyboard would search all QMBasic source programs in the BP file for references to the !SORT() subroutine.

 

 

See also:

ALL.MATCH, NO.CASE, NO.MATCH