> -----Original Message-----
> From: IBM Mainframe Discussion List On Behalf Of Howard Brazee
> 
> On 25 May 2010 10:08:09 -0700, [email protected] (Chase, John) wrote:
> 
> >> >INCLUDE COND=(1,9,CH,GE,C'000000000',AND,1,9,CH,LE,C'999999999')
> >>
> >> That would allow '00x000001'.
> >
> >How so?  Any position in the field less than c'0' (x'F0') would cause
> >the entire field to evaluate less than c'000000000', thus failing the
GE
> >requirement; and any position in the field greater than c'9' (x'F9')
> >would cause the entire field to evaluate greater than c'999999999',
thus
> >failing the LE requirement.
> 
> A quick test shows that you are correct.   But it doesn't makes sense
> to me.   The following are sorted:
> 
> 000000000
> 0001X0000
> 000100000
> 000300000
> 0004X0000
> 000500000
> 000600000
> 000700000
> 
> If I did that check in CoBOL, it wouldn't be a valid numeric check.

The data type you specify in the INCLUDE is CH, or Character, so it's
evaluating on the character representations of the numerics:  Left to
right, and the first byte that exceeds either bound causes omission of
the entire field (record).

    -jc-

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to