I am beginning to have a suspicion that some readers at least do not know how branch tables. C switch statements, and the like work. Here, given a state-code of, say, 'NY', its two-byte code point, in EBCDIC x' d5e8', is used as an offset to address a unique byte in that table, one of bytes 0,1, 2,...,65635. A single properly framed TRTO instruction yields the value of that target byte. There is no faster way to do this, and this is the case even on, say, a RISC machine , where it must be programmed [trivially].
John McKown's suggestion that a three way branch should perhaps be implemented as if-then-else-if-then-else-if-then-else<error sink> is entirely correct but not interesting here. COBOL EVALUATE and its analogues in other languages are for many-way branches. John Gilmore, Ashland, MA 01721 - USA ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
