Wednesday, November 01, 2006

The most common COBOL interview question

The most common technical interview question that I would get over the years was "What's the difference between an ordinary SEARCH and a SEARCH ALL? What precautions are necessary in using them?"

Of course, we all know that a SEARCH ALL is a binary search, and that the items must be in sequence for a binary search (successive splits of the card deck) to work. Binary logic -- and the mathematics of logarithms and exponents -- is what makes search engines today work.

In 1988/1989, I was in a job where the consulting company (which produced hospital Medicare operating margin reports for clients) was charged for its CPU time, and I reduced the CPU time for a particular outlier job by reading a VSAM file sequentially into a table, and using a binary search. The job ran much faster and cost much less. At one point, one day in January 1989, we had, to even stay in business, to rerun a simulation quickly and get correct simulation results after changing some parameters based on the Federal Register. Fortunately, I had made this change and the successful rerun was done in less than an hour.

No comments: