EESEARCH
Searches a single file, a list of files, or all files in current account for specified character strings.
Syntax
EESEARCH {filename} {(options}
Syntax elements
filenameThis is the file name to be searched. An asterisk can be used to signify all accounts. If a select list is active, the filename is not necessary and is ignored. If the file name is omitted and no select list is active then a No items present
error is generated.
Prompts
After the sentence is entered, the processor prompts:
STRING:
Enter a character string and press RETURN. The prompt is repeated until only RETURN is pressed. The total of all character strings entered can be up to 500 characters .
Double quotes should not be entered.
Options
A ANDs string together. Items must contain all specified strings.
F Includes the item-id in the search.
N Selects only those items that do not contain the specified string(s).
O Sorts the resulting matched items in a file alphabetically. Searching large files will slow the process if this option is used.
R Suppresses the No items present
message that is generated if no items are selected.
U Specifies that case is significant when comparing strings.
W Specifies that case should be ignored when comparing strings.
Comments
As the search can involve a large amount of data and/or items, the user has a number of opportunities to abort sections of the search using certain keystrokes:
Control-X Aborts the search and immediately returns to TCL.
Control-YAborts the search of the current file data section and begins searching the next data section.
The process checks for the use of selected keystrokes before processing a file, and after each batch of 500 items in the file.
The name of the file and data section currently being processed is displayed to provide an indication of the progress.
DataBasic object code is not searched.
Case sensitivity
If neither U nor W is specified, the current data case setting (set with the DATA.CC environment option or the CASE TCL command) is used. See Case Sensitivity for more details.
If both U and W are specified an error message is displayed and no list is generated.
Example
In the following example, all files on the current account (HOTEL in this example) are searched for any items containing any of the terms "Henn" or "Mc" regardless of case including the item id. The returned results show the file name, data section, and item id of those matching items:
:EESEARCH * (WF STRING: Henn STRING: Mc BP BP RESET-DEMO GUESTS GUESTS 143 GUESTS 234 PAYMENT CODES PAYMENT-CODES MC SAVE.GUESTS SAVE.GUESTS 143 SAVE.GUESTS 243 6 ITEMS LISTED
In the following example, all files on the current account (ACCOUNT1) are searched for any items containing both the terms ABC123 and DEF456 using the case sensitivity of the database:
:LOGTO ACCOUNT1 :CASE [1315] Case sensitive. :EESEARCH SQL (A STRING ABC123 STRING DEF456 STRING: STOCK ORDERS ORD001 ORDERS ORD099 INVOCES INV004 3 ITEMS LISTED