Subject: | |
From: | |
Reply To: | |
Date: | Sun, 22 Oct 2000 01:46:59 EDT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Ric rightly writes:
> >Although the manuals may suggest an interpretation something like the
> comment
> >above, your statement is a mild misinterpretation of what is actually
being
> >said. The way that the manual's comments should be read is: if you need a
> >COBOL binary integer between 5 and 9 digits, then a J2 datatype will fill
> >your bill. A J1 datatype won't be big enough, and a J4 would be overkill.
> >
> >What's not being said, even though it could be read that way, is that a J2
> >datatype can only legitimately contain numbers with a minimum of 5 digits
> and
> >a maximum of 9 digits. A COBOL-legitimate datavalue for a J2 field can
> range
> >from 0 (1 digit) to plus or minus 999999999 (nine digits) -- and that's
> only
> >if the application program enforces those rules. IMAGE itself, as I
> mentioned
> >earlier, doesn't impose any restrictions on the bit patterns that can be
> put
> >into the 32-bits of a J2 dataitem.
> >
> >Wirt Atmar
> >
>
> I disagree. I have never heard of a simple data type that doesn't allow
> the value of 1, 2 ... What the manuals are stating is that if you will
> need from 5 to 9 decimal digits, then it will take a 32 bit binary field to
> store that range of numbers (J2). That doesn't exclude the values from 1
> to 4 digits. (Of course it's all base on the fact that decimal numbers
> don't map directly into binary numbers.) In other words, the value 1 is a
> legitimate value for a J2 datatype in Image just as it is in a Cobol S9(9)
> Comp field.
No, you don't disagree. You simply restated exactly the same thing I tried to
say above.
What I disagreed with -- and so did you -- was the earlier sentiment that a
J2 datatype is constrained to a minimum of 5 digits and a maximum of 9. The
latter condition is true (sort of, if the application enforces it). The
former is not.
Wirt Atmar
|
|
|