ESEARCH


Generates an implicit list of records in a file if they contain (or do not contain) one or more occurrences of specified character strings.

 

SYNTAX

ESEARCH file-specifier {record-list} {selection-criteria} {sort-criteria} {USING file-specifier} {(options}

 

SYNTAX ELEMENTS

options can be one or more of the following:

Option Description
A ANDs prompted strings together. Records must contain all specified strings.
I Displays the keys of selected records.
L Saves the field numbers in which the specified strings were found. The resulting list contains the record keys followed by multivalued line numbers. Ignores the A and N options if either or both are specified.
N Selects only those records that do not contain the specified string(s).
S Suppresses the list but displays the record keys that would have been selected.

 

PROMPT

You will be prompted to supply one or more search strings:

STRING:

Enter the required character string and press RETURN. This prompt is repeated until only RETURN is pressed. There is no limit on the number of characters that be entered.

Do not enter double quotes unless they are part of the string to search.

 

NOTES

When the command terminates (unless the "S" option is used), the total number of entries in the generated list is displayed and the list is made available as if it had been generated by a SELECT, GET-LIST or other list-providing command.

If you do not specify a sort criteria clause, the record list will be unsorted.

 

EXAMPLE

:ESEARCH SALES (I
STRING: ABC
STRING: DEF
KEY1
KEY2

2 Records selected

>

Generates a list of all records in the SALES file which contain the strings ABC or DEF.


jQL