Multiple choice technology mainframe

The result of SEARCH ALL is predictable only when the table is defined with ASCENDING or DESCENDING KEY and the key should uniquely identify an occurrence of the table entry.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

SEARCH ALL performs a binary search in COBOL tables. For predictable results, the table must be defined with ASCENDING or DESCENDING KEY, and the key must uniquely identify each table entry. Without these conditions, binary search behavior is undefined.

AI explanation

SEARCH ALL performs a binary search, which only works correctly if the table entries are actually maintained in the sorted order (ascending or descending) declared for the key, and the key must uniquely identify each entry so the binary search converges on the right match. Without a properly ordered, uniquely-identifying key, a binary search can miss the correct entry or behave unpredictably.