In COBOL programming, what is the difference between SEARCH and SEARCH ALL? What is more efficient?
Kunal Gautam
DIFFERENCE BETWEEN SEARCH AND SEARCH ALL SEARCH: 1) Used for sequential search in COBOL tables. 2) The entries do not need to be in any order. 3) SEARCH can use multiple WHEN conditions. 4) SEARCH can be used with any relational condition 5) SET statement is a must for initializing the index before its usage.SEARCH ALL 1) Used for Binary search. 2) The table entries must be in some order 3) Only one WHEN is allowed. 4) SEARCH ALL works with only equality condition. 5) SET statement is not required.SEARCH ALL is more efficient.