cobolSEARCH statement


Remarks

The COBOL SEARCH statement comes in two forms. Linear top to bottom SEARCH and a binary SEARCH ALL algorithm. Binary SEARCH ALL assumes a sorted table suitable for a binary search with no elements out of order.

SEARCH statement

SEARCH statement syntax diagram

Linear SEARCH

Linear SEARCH syntax diagram

Binary SEARCH ALL

enter image description here