> Trying to select records by a text key field (not unique) consisting of 
> numbers where n < key < m.
>
> Even if sorted by the key field, Begin and Inside don't do it because it's 
> not guaranteed any record(s) will have
> precisely n or m as a key.
>
> So far I'm sorting then using Rexx to fish out the ones I want. I haven't 
> discovered a stage yet that does this.

Indeed as Kris says, PICK can compare fields by numeric value (using < and > 
rather
the << and >> that are for string comparison). And be aware of the tricks

   pick w1 < ,99,        When the first word is less than 99
   pick w1 << ,99,       String comparison, so "100" is less than "99"
   pick w1 < 99          Numeric value is less than what's in column 99
   pick from w1 < ,99,   All records after the first with w1 < 99

You can also do some tricks with "if" in SPEC but if you start using that
to program the flow, it can easily distract you from proper pipethink.

The classic approach would be destructive testing where you add a prefix
to the record that has the numeric value adjusted such that you can do a
string comparison on it (mind the negative numbers, if necessary).

Sir Rob the Plumber
z/VM Development - CMS Pipelines

Reply via email to