Prev: My COBDATA problem
Next: License Management Service
From: yogi on 30 Nov 2009 21:49 Hi All, I had a question regarding blanks or SPACES in numeric fields. Would SPACES pass the IS NUMERIC test used for checking if the value is numeric or not. Since SPACES can be compared arithmetically (> SPACES), I was wondering if it would pass the IS NUMERIC test. Thanks in advance
From: Richard on 30 Nov 2009 22:01 On Dec 1, 3:49 pm, yogi <yogi...(a)gmail.com> wrote: > Hi All, > I had a question regarding blanks or SPACES in numeric > fields. Would SPACES pass the IS NUMERIC test used for checking if the > value is numeric or not. Since SPACES can be compared arithmetically > (> SPACES), I was wondering if it would pass the IS NUMERIC test. > > Thanks in advance SPACE is not a numeric digit.
From: William M. Klein on 30 Nov 2009 23:21 Easy answer, when running in "standard conformance" mode, IF NUMERIC will fail when a field contains spaces. It will also have "unpredictable results" if a field deinfed as numeric includes spaces when compared to SPACERS or anything else - at run-time. HOWEVER, results with specific ompiler may vary. In particular, the use of the ZWB compiler option (IBM and MF) impacts how USAGE DISPLAY numeric fields are treaded when some "bytes" contain spaces. "yogi" <yogibad(a)gmail.com> wrote in message news:ac1c02d1-64a3-400b-9c9a-63989d519a2b(a)f16g2000yqm.googlegroups.com... > Hi All, > I had a question regarding blanks or SPACES in numeric > fields. Would SPACES pass the IS NUMERIC test used for checking if the > value is numeric or not. Since SPACES can be compared arithmetically > (> SPACES), I was wondering if it would pass the IS NUMERIC test. > > Thanks in advance
From: Howard Brazee on 1 Dec 2009 10:25 On Mon, 30 Nov 2009 22:21:24 -0600, "William M. Klein" <wmklein(a)nospam.netcom.com> wrote: >Easy answer, when running in "standard conformance" mode, IF NUMERIC will >fail when a field contains spaces. It will also have "unpredictable >results" if a field deinfed as numeric includes spaces when compared to >SPACERS or anything else - at run-time. I never cared for the definition of IF NUMERIC. -- "In no part of the constitution is more wisdom to be found, than in the clause which confides the question of war or peace to the legislature, and not to the executive department." - James Madison
From: William M. Klein on 1 Dec 2009 10:40
One addendum to my original response. I can't remember (and haven't looked it up today) whether the '02 Standard allows an "If numeric" test on a numeric-edited field, If so, then where the picutre string has "Z" or if the data definition has "blank when zero", then IF numeric would "pass" when spaces were in such a field. As I say, I don't remember is this is either Standard conforming or allowed by any, many, or no compilers - buti it does make sense for spaces to be "allowed' where the data definition says they are allowed. (I am out of town and can't easiy est or research this. If I get a "better" answer later in the week, I will post that) "Howard Brazee" <howard(a)brazee.net> wrote in message news:9bdah59bd3mm0f2l55hfssk4bnt3n7ifs6(a)4ax.com... > On Mon, 30 Nov 2009 22:21:24 -0600, "William M. Klein" > <wmklein(a)nospam.netcom.com> wrote: > >>Easy answer, when running in "standard conformance" mode, IF NUMERIC will >>fail when a field contains spaces. It will also have "unpredictable >>results" if a field deinfed as numeric includes spaces when compared to >>SPACERS or anything else - at run-time. > > I never cared for the definition of IF NUMERIC. > > -- > "In no part of the constitution is more wisdom to be found, > than in the clause which confides the question of war or peace > to the legislature, and not to the executive department." > > - James Madison |