In COBOL, the "SEARCH" statement is utilized for locating a specific value in a table or array, performing a sequential search to find the first occurrence. It transfers control to the appropriate "AT END" or "WHEN" phrase based on the search result, making it suitable for finding a single occurrence of a value and determining its existence.
On the other hand, the "SEARCH ALL" statement is employed when searching for multiple occurrences of a value in a sorted table. It utilizes a binary search algorithm, making it more efficient for large sorted tables, and sets an index to indicate the position of each occurrence within the table. This makes it ideal for scenarios where you need to find multiple instances of a value or determine their positions within the sorted table.