Page 2 of 2

Re: Check whether a field is Numeric or not

PostPosted: Thu Aug 30, 2012 8:02 pm
by BillyBoyo
I think the values for 2 and 3 are what they should be, but, (and you can see it is a big one) I now suspect you are right about the whole thing.

Nik, if you do it without the other stuff (the REVERSE and LEADING SPACE, as set out previously) then you will be letting bad data through.

You have ALL SPACE for your INSPECT, where you need LEADING (after the REVERSE, because "trailing space" is OK but leading or embedded is no, but you can't put TRAILING on the INSPECT).

9
 1
  2
   3
    4


Only the 9 is valid, yet with your INSPECT all would be accepted.

Re: Check whether a field is Numeric or not

PostPosted: Fri Aug 31, 2012 5:24 pm
by Nik22Dec
Hi All,

Apologies! I should have been clearer in presenting my peculiar requirement. In my case, leading spaces are also acceptable. I move the input value to the output field by using NUMVAL. So, that takes care of it.

The inspect is just to enure that we don't pass a non-numeric(plain spaces/alphabetic/alphanumeric) value to NUMVAL.I filter out all spaces before the INSPECT. I finally check the copied & meshed value with IS NUMERIC which tells me if the value entered is a valid one or not.

I most sincerely appreciate your concern & willingness to help me out with this. I feel lucky to be able to reach out to all of you in my time of crisis. Thank you All!!