Binary Search vs SEARCH ALL
Binary Search vs SEARCH ALL
(OP)
Which is more efficient? Manual Binary search (using various nested IFs) or SEARCH ALL function? I need to search an entry in a sorted table of 2000 elements, and this check will happen for million records for a job. There are 1000s of similar jobs that will run every day.
Help me out,
Cobol Learner
Help me out,
Cobol Learner
RE: Binary Search vs SEARCH ALL
RE: Binary Search vs SEARCH ALL
RE: Binary Search vs SEARCH ALL
RE: Binary Search vs SEARCH ALL
Tom Morrison
www.liant.com
RE: Binary Search vs SEARCH ALL
IF ARG = KEYX MOVE TBL-DATA(KEYX) etc...
ELSE
SEARCH TBL-X...
Another efficiency trick is to move the tbl entry to a ws field and then use the ws field from that point on.
Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering