cobol1.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SEARCH (↑ Statements)
 Key                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Verb:         SEARCH
 
  Function:     Searches a table for an element satisfying a given
                condition and sets the associated index-name to point
                to it.
 
  Syntax:       Which format?  Simple   ALL
 
  ──SEARCH ALL identifier-1─┬────────────────────────────────┬─────────
                              └┬──┬─END imperative-statement-1─┘
                               └AT┘
 
  ─WHEN─┬─data-name-1─┬───┬─┬─EQUAL─┬──┬┬─┬─identifier-3────────────┬─┬─
         │             ├IS─┤ │       └TO┘│ ├─literal-1───────────────┤ │
         │             └ARE┘ └─ = ───────┘ └─arithmetic-expression-1─┘ │
         ├─┬─identifier-3────────────┬┬─IS──┬┬─EQUAL─┬──┬┬─data-name-1─┤
         │ ├─literal-1───────────────┤└─ARE─┘│       └TO┘│             │
         │ └─arithmetic-expression-1─┘       └─ = ───────┘             │
         └─condition-name-1────────────────────────────────────────────┘
 
   ┌───────────────────────────────────────────────────────────────────┐
   ▼                                                                   │
  ┬───────────────────────────────────────────────────────────────────┬─
   └─AND─┬─data-name-2─┬───┬┬─EQUAL─┬──┬┬┬─identifier-4────────────┬─┬─┘
         │             ├IS─┤│       └TO┘│├─literal-2───────────────┤ │
         │             └ARE┘└─ = ───────┘└─arithmetic-expression-2─┘ │
         ├┬─identifier-4────────────┬┬─IS──┬┬─EQUAL┬──┬┬─data-name-2─┤
         │├─literal-2───────────────┤└─ARE─┘│      └TO┘│             │
         │└─arithmetic-expression-2─┘       └─ = ──────┘             │
         └─condition-name-2──────────────────────────────────────────┘
 
  ───┬─imperative-statement-2─┬─────
      └─NEXT SENTENCE──────────┘
 
  ─┬────────────┬──
    └─END-SEARCH─┘
                                    -♦-