Perhaps I shouldn't comment further. I don't want to ignite a religious war
... but perhaps it'll be safe enough to concur that yes, you certainly can
do a lot more with pipe (and quite elegantly) , but sometimes (and I think
this is one of those cases) the code you need to accomplish it is anything
but obvious, even to someone like me who's been using pipes for nearly a
decade (admittedly without a deep understanding of the innards, but even so
some of my pipelines are wondrous to behold, at least to me ;-). Oh, and if
what you say were strictly the case, would we really have a SPACE stage?
Wasn't that done to make it easier to accomplish something that could be
accomplished with a similar set of somewhat-less-obvious stages? Where/how
do you draw the line?

On 10/11/07, Rob van der Heij <[EMAIL PROTECTED]> wrote:
>
> 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
>

Reply via email to