From: Anonymous on
In article <hf94sb$aql$2(a)news.eternal-september.org>,
Doug Miller <spambait(a)milmac.com> wrote:
>In article <hf5t5t$og3$1(a)reader1.panix.com>, docdwarf(a)panix.com () wrote:
>>Now my memory is, admittedly, porous but I recall that IBM mainframe
>>compilers (IKFCBL00 and IGYCRCTL) will successfully test COMP-3 (packed
>>decimal format) fields with IS NUMERIC... and as a COMP-3 field, in my
>>experience, often has its least significant nibble reserved for the
>>field's sign (usually C for positive, D for negative) then a COMP-3 field
>>containing X'123D' may pass an IS NUMERIC test while not, by your
>>standard, containing an numeric digit.
>
>1, 2, and 3 are numeric digits, no? The sign nybble is ignored.

If the sign is ignored then a COMP-3 field containing X'0000' would pass
an IS NUMERIC test... and as I recall - porous memory and all - it
doesn't. COMP (binary) fields, no problem... but COMP-3 needs a valid
sign.

Perhaps some testing is in order.

DD

From: slade on
On Dec 3, 3:16 pm, docdw...(a)panix.com () wrote:
> In article <hf94sb$aq...(a)news.eternal-september.org>,
>
> Doug Miller <spamb...(a)milmac.com> wrote:
> >In article <hf5t5t$og...(a)reader1.panix.com>, docdw...(a)panix.com () wrote:
> >>Now my memory is, admittedly, porous but I recall that IBM mainframe
> >>compilers (IKFCBL00 and IGYCRCTL) will successfully test COMP-3 (packed
> >>decimal format) fields with IS NUMERIC... and as a COMP-3 field, in my
> >>experience, often has its least significant nibble reserved for the
> >>field's sign (usually C for positive, D for negative) then a COMP-3 field
> >>containing X'123D' may pass an IS NUMERIC test while not, by your
> >>standard, containing an numeric digit.
>
> >1, 2, and 3 are numeric digits, no? The sign nybble is ignored.
>
> If the sign is ignored then a COMP-3 field containing X'0000' would pass
> an IS NUMERIC test... and as I recall - porous memory and all - it
> doesn't.  COMP (binary) fields, no problem... but COMP-3 needs a valid
> sign.
>
> Perhaps some testing is in order.
>
> DD

In an IBM mainframe environment, depending on the NUMPROC/NUMCLS COBOL
compiler options selected, your sign choices are limited, at best, to
X'A" thru X'F'; at worst, to X'F'. Any other nybble will result in a
"FALSE" return from IF NUMERIC.

So, as Doc said, the sign for numeric DISPLAY (and COMP-3) fields is
not ignored; X'F1F203' will generate a "FALSE" return.

If the item is defined w/SIGN IS SEPARATE (not an issue here,
apparently) there are other criteria.
From: Anonymous on
In article <2a82e1bc-8e40-4704-8206-c76ee94a5f0a(a)n13g2000vbe.googlegroups.com>,
slade <jnjsle1(a)optonline.net> wrote:
>On Dec 3, 3:16?pm, docdw...(a)panix.com () wrote:
>> In article <hf94sb$aq...(a)news.eternal-september.org>,
>>
>> Doug Miller <spamb...(a)milmac.com> wrote:
>> >In article <hf5t5t$og...(a)reader1.panix.com>, docdw...(a)panix.com () wrote:
>> >>Now my memory is, admittedly, porous but I recall that IBM mainframe
>> >>compilers (IKFCBL00 and IGYCRCTL) will successfully test COMP-3 (packed
>> >>decimal format) fields with IS NUMERIC... and as a COMP-3 field, in my
>> >>experience, often has its least significant nibble reserved for the
>> >>field's sign (usually C for positive, D for negative) then a COMP-3 field
>> >>containing X'123D' may pass an IS NUMERIC test while not, by your
>> >>standard, containing an numeric digit.
>>
>> >1, 2, and 3 are numeric digits, no? The sign nybble is ignored.
>>
>> If the sign is ignored then a COMP-3 field containing X'0000' would pass
>> an IS NUMERIC test... and as I recall - porous memory and all - it
>> doesn't. ?COMP (binary) fields, no problem... but COMP-3 needs a valid
>> sign.
>>
>> Perhaps some testing is in order.
>
>In an IBM mainframe environment, depending on the NUMPROC/NUMCLS COBOL
>compiler options selected, your sign choices are limited, at best, to
>X'A" thru X'F'; at worst, to X'F'. Any other nybble will result in a
>"FALSE" return from IF NUMERIC.
>
>So, as Doc said, the sign for numeric DISPLAY (and COMP-3) fields is
>not ignored; X'F1F203' will generate a "FALSE" return.

That's as I recall it, aye... but it was from Long Ago and perhaps things
had changed. Has anyone done any testing? If so, might they post the
code and results, so that experiment's reproducibility be verified?

DD

First  |  Prev  | 
Pages: 1 2 3
Prev: My COBDATA problem
Next: License Management Service