On 10/11/07, Bob Cronin <[EMAIL PROTECTED]> wrote: > PMFJI but is all this complexity for such a relatively simple function worth > it? Kinda cries out for a built-in stage if you ask me. Rexx has both Pos > and Wordpos ... ;-)
A screwdriver is more complicated to use than a hammer because you have to learn which way to turn it to tighten the screw, and you may need a different type of screwdriver for different type of screws. For some of the things you can do with the screwdriver, the hammer would do too. For very simple things, the REXX built-in functions sometimes do what you want. But beyond that, a REXX program will take more to do the job. With 3 stages I can select records that contain a particular word, where 1 wordpos( ) call could do (when you remember the order of operands). If you want to remove separators like comma or brackets, it's 4 stages - versus 2 built-in REXX functions. But when you want to select records that contain one or more words from a set, it's 6 stages in CMS PIpelines, but needs a loop and extra programming in REXX. To me that's where the break-even was. If you always have simple problems, continue to use REXX. I don't think we really need a new stage when you can achieve the same with 3 built-in stages and no heavy extra cost. Once you master an idiom like predselect, you can also use all other criteria to select records. Like all records that have a word where the 2nd character of the word was "a" Or the records that have a palindrome in them (I feel a challenge coming). Rob
