× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: Joe Pluta
>
> What I asked was why a 4B field is the same size as a 5I field,
> but not the
> same size as a 5B field, which is even more confusing than the
> 4B/BINARY(4)
> mismatch.  You've alluded to the fact that it has to do with decimal
> precision.  A 5I field can hold any decimal representation of a two-byte
> binary field, which can in turn hold any four-digit decimal number (4B).

A little further thought on the subject yields the following:

B fields can have any precision, because they are used to represent actual
application data, just ilke packed or zoned fields.  The size of a type B
field is the MINIMUM size of a binary field required to hold a value of that
precision.  Thus, a 4B field can be held in two bytes, while a 5B field
requires four bytes.

The I/U fields, on the other hand, are used specifically to define a binary
field.  You specify the minimum number of digits required to hold all the
possible values for a binary field of a given size.  That's why I/U fields
can only be specified for 3, 5, 10 or 20 digits, corresponding with 1, 2, 4
and 8 byte binary fields.

At least that's my read on the situation, and I'm stickin' to it <grin>.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.