Hi,
perhaps it is not sorted right. Or perhaps you need some high-values for not filled elements at the end of the table.
You can also make your own binairy search by doing something like this:
009300 ZOEK-H-HEX-OMSCHRIJVING SECTION.
009400 ZHH-01.
009500 MOVE ZERO TO SUB-FIRST.
009600 MOVE +255 TO SUB-LAST.
009700 PERFORM UNTIL SUB-FIRST > SUB-LAST
009800 COMPUTE SUB = (SUB-FIRST + SUB-LAST) / 2
009900 IF H-HEX-TEKEN >
010000 HEX-OMSCHRIJVING (SUB)
010100 COMPUTE SUB-FIRST = SUB + 1
010200 ELSE
010300 IF H-HEX-TEKEN <
010400 HEX-OMSCHRIJVING (SUB)
010500 COMPUTE SUB-LAST = SUB - 1
010600 ELSE
010700 GO TO ZHH-99
010800 END-IF
010900 END-PERFORM.
011000 ZHH-03.
011100 MOVE +9999 TO RETURN-CODE.
011200 ZHH-99.
011300 EXIT.
The sub-first is the starting position in the table and sub-last is the last position. You will probably need +1 as the first value but I use sometimes zero.
With your debugger, you can use this code and see where it goes wrong.
Regards,
Crox