search-system command

The search-system BASIC program searches every file in the D3 file system for the existence of one or more strings of characters in any attribute, and optionally creates and saves a list.

Syntax

 search-system {destination.file} {(options)}

Synonym(s)

 find2

Parameter(s)

options ? Displays online usage information about the process.
a Displays all items searched, including items in which the string was not found.
c Clears the output file prior to execution.
m Checks for multiple occurrences.
p Directs output to the system printer via the spooler.
s Suppresses display on the screen.
q Searches remote accounts and files.

Description

If a master dictionary name is provided, only that account is searched. The search-system command searches remote accounts (Q-pointers) in the mds.

The search-system command scans each item in each file looking for a string match in any attribute. If a match is found, it displays the item-ID and the attribute containing the matching string. Any number of unique strings can be specified. The search is successful if any one string matches any portion of the attribute.

Search process

A data file search can be specified to search system-wide horizontally:

  1. At the Enter the output file name? prompt, enter the file name where the found items are saved.

    The file name must already exist. As items are found, control items are added to the output file. Control items are sequentially-assigned numeric item-IDs, beginning with 1.

  2. At the Enter the search string? prompt, enter the string without any enclosing delimiters.

    The system repeatedly asks for additional strings.

    Note:

    A question mark can be used as a wildcard character in the string, with up to 15 different strings specified.

    You can locate a string that contains a question mark using a backslash followed by a question mark: \ ?

  3. After the last string has been entered, press Enter at the Enter the search string? prompt.

    The following prompt indicates at which level of the file system to begin the search:

     Start level 0-mds, 1-master dictionary, 2-file dictionary, 3-data file?
    

    The search-system command has hierarchical level control. The four levels are:

    • 0 = mds
    • 1 = md
    • 2 = dict file
    • 3 = data file
  4. Enter the level to begin the search.

    Any range can be specified.

    You will see one of the following prompts:
     Stop Level 0-mds, 1-master Dictionary, 2-file Dictionary, 3-data File?
    
     Lateral Level 0-mds, 1-master Dictionary, 2-file Dictionary, 3-data File?
    

    This is the level to continue the search. The routine can either traverse a single branch of the hierarchy (such as a single account and all its files) or it can traverse laterally across the branches (such as all the data files only of all the accounts). The stop/lateral level must be equal to or lower than the start level.

Output is an item of the format:

 001 mds (account name)
 002 dict, data file name
 003 item-ID 
 004 attribute number in which text was found
 005 attribute text
 006 the search string