COBOL Difference between Search and Search All

COBOL Search All COBOL Redefines

Advertisements


Below are the differences in between Search and Search all.


SearchSearch All
SEARCH is also called as linear or sequential search.SEARCHALL is also called as binary search.
Initialization & incrementing of index is required.Only initialization is required of an index. Incrementing is done automatically by the system.
Multiple when conditions can be coded.Only one WHEN condition can be coded.
Multiple arithmetic operators like =, >, <, <=, >=, NOT= can be used.Only = operator is allowed.
Access is slow.Access is faster.
SEARCH is used for single dimensional & multidimensional arrays also.SEARCHALL is used for only single dimensional array.
Data inside an array need not be in sorted order. Data must be in a sorted order.

COBOL Search All COBOL Redefines

Advertisements