BSEARCH                                                          BSEARCH



     The BSEARCH command is summarized as follows:

          BSEARCH is a data reclassification command which allows the
          user to perform complex Boolean retrievals from a multiple
          attributes file of a MOSS vector map.  Given that the proper
          information is in the attribute file, the user could ask a
          question such as:

          FIND ALL THE WELLS IN WELL.MAP THAT HAVE BEEN DRILLED SINCE
          1975 AND ARE DEEPER THAN 5000 FEET OR HAVE OIL SHOWS.

          The multiple attributes file will be searched, and items
          which meet the search criteria will be used to generate an
          active map ID that will be referenced in the active map table.
          This map can then be WINDOWed, PLOTted on the screen, and
          labeled using the LEGEND command.  The active map may also
          be GRIDed as GRID works with multiple attributes.


     The BSEARCH command is specified as follows:
     (* denotes parameters which can only be entered in a prompted mode)

          BSEARCH (map name) (search string)*


     The individual parameters of the BSEARCH command are described
     below:

          (map name) is the name of the map to be searched.

          (search string) is a logical expression which specifies the
          search criteria.  A logical expression is one or more logical
          terms.

          The generic form of a logical term is
                   KEY   RELATION   VALUE  [OPERATOR]

       KEY is the attribute key name to be searched. Before using
       BSEARCH, existing keys in the attribute file can be listed
       using DESCRIBE <mapname> ATTRIBUTE.

       RELATION is a relational operator. The following are valid:

           LE   LESS THAN OR EQUAL
           LT   LESS THAN
           EQ   EQUAL
           NE   NOT EQUAL
           GE   GREATER THAN OR EQUAL
           GT   GREATER THAN
           $$   CONTAINS THE STRING (ONLY FOR CHARACTER DATA)

       VALUE is an actual value (integer, real, or character) that will
       be used for comparison during the search.

       OPERATOR is a logical operator. The only valid operators are
       AND and OR.  If there are more than one logical term in the
       logical expression, they must be connected by a logical
       OPERATOR.

       The search string may be continued on a new line by using an
       ampersand (&) at the end of a line.  The ampersand can only
       be used before or after the logical operator AND or OR.
       Parentheses may be embedded in the search string to cause
       evaluation of the innermost search string first.  Character
       strings that contain spaces must be in quotes.  The maximum
       string length for character comparison is 72.  All expressions
       (including the &) in the search string must be separated by at
       least one space, except quotes and parentheses.


     The following are examples of use of the BSEARCH command:

           ENTER COMMAND
          ? BSEARCH
           PLEASE ENTER NAME OF MAP TO SEARCH
          ? WELL.MAP
           PLEASE ENTER SEARCH STRING
          ? DRILL.DATE GE 1975 AND (DEPTH GT 5000 OR OIL.SHOWS NE 0)
                19 ITEMS FOR ACTIVE ID    1

           ENTER COMMAND
          ? BSEARCH
           PLEASE ENTER NAME OF MAP TO SEARCH
          ? WELL.MAP
           PLEASE ENTER SEARCH STRING
          ? OPERATOR $$ SMITH AND WELL.TYPE EQ "DRY HOLE"
                2 ITEMS FOR ACTIVE ID     2

          ENTER COMMAND
          ? BSEARCH
          PLEASE ENTER NAME OF MAP TO SEARCH
          ? WELL.MAP
          PLEASE ENTER SEARCH STRING
          DRILL.DATE GE 1975 AND DEPTH GT 5000 AND &
          WELL.TYPE EQ "DRY HOLE"
               10 ITEMS FOR ACTIVE ID     3


     The limitations of the BSEARCH command are as follows:

          -- Map must have a multiple attribute file.

          -- There can be no more than 8192 items in the map.
              (Use SELECT <mapname> ATTRIBUTE for maps with more than
               8192 items).

          -- A maximum of 20 logical terms can be entered in the logical
             expression, each seperated by a logical operator
             (AND or OR).

          -- The active map table only lists the last 30 characters
             of the search string.
