The Format 2 SEARCH ALL statement executes a binary search.
The search index need not be initialized by SET statements, because its setting is varied during the search operation so that its value is at no time less than the value of the first table element, nor ever greater than the value of the last table element. The index used is always that associated with the first index-name specified in the OCCURS clause.
Before the search takes place, the values of all indexes should be set for higher dimensions of the table to define a specific table of identifier-1 elements.
Identifier-1 must refer to all occurrences within the table element; that is, it must not be subscripted or indexed.
Identifier-1 cannot be a pointer data item or a procedure-pointer data item.
+-------------------------------IBM Extension--------------------------------+
Identifier-1 cannot be a floating-point data item.
Identifier-1 can be a DBCS data item if the ASCENDING/DESCENDING KEY is defined as a DBCS data item.
Identifier-1 can be a date-time data item if the ASCENDING/DESCENDING KEY is defined as a date-time data item.
+----------------------------End of IBM Extension----------------------------+
The Data Division description of identifier-1 must contain an OCCURS clause with the INDEXED BY option. For Format-2, the Data Division description must also contain the KEY IS phrase in its OCCURS clause.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.