Wrong, that should be doing a numeric compare.  Look it up.
A comparison operator of <<= would be for a string compare.  "<=" asks for
numeric comparison.

--
Mike Harding
z/VM System Support
/sp


CMSTSO Pipelines Discussion List <CMS-PIPELINES@VM.MARIST.EDU> wrote on
08/23/2016 01:58:27 PM:

> From: Ronald van der Laan <nl50...@gmail.com>
> To: CMS-PIPELINES@VM.MARIST.EDU
> Date: 08/23/2016 01:59 PM
> Subject: Re: Incorrect Handling of Negative Numbers With PICK?
> Sent by: CMSTSO Pipelines Discussion List <CMS-PIPELINES@VM.MARIST.EDU>
>
> Michael,
>
> You're doing string compares, so "-0......" is less than "-1".
> You'll also find that "-2000000.0000000" will not pass your filter...
> Try  ... | pick substr 1 of w2 = /-/ and substr 2-* of w2 >>=
> /00000001.000000/ | ...
>
> Op dinsdag 23 augustus 2016 heeft Michael Marrer <rexx-pi...@marrer.com>
> het volgende geschreven:
>
> > This would seem to be basically working, as I do get the numbers less
> > than negative 1 in the output file:
> >
> > pipe '  (end ?) < ' filename filetype filemode,
> >      '| pick w2  <= /-1/ ',
> >      '| > ' filename ' WORDOVER ' filemode,
> >      ' '
> >
> > The problem is that I get ALL negative numbers, not just those less
> > than negative 1.  For example, these get selected as well:
> >
> > -
> >
> > -00000000.007800
> >
> > So does anyone have any idea what is going wrong?
> >
> > I know I can also accomplish what I want by defining the word with a
> > variable in a SPECs stage and doing an IF/THEN operation, but as I
> > will be doing other tests on that word as well as other words in the
> > data file, it will get a little convoluted.
> >
> > I believe this represents the level of Pipes we are using:
> >
> > 11 Rev 0C Mod 0002
> > 110C0002
> >
>
>
> --
> Ronald van der Laan
>

Reply via email to