zoned and packed are both limited in that they don't store the decimal
point in the data. And the bit pattern for the sign is both vulnerable
to a decimal data error and does not convert from one ccsid to
another. ( F1F2F3 will convert to whatever the encoding is for unicode
123. But F1F2D3 does not translate to 123- )

Ideal would be to store numbers as char strings with a deciimal point
and sign char. But then all the programming languages I know would
not handle such fields as numeric data.

On Fri, Sep 2, 2011 at 8:01 AM, Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx> wrote:
Generally speaking, what is the current wisdom about storing numeric
data in the database?  Do folks still prefer packed representation for
data with decimal positions?  Zoned is a little easier on the eyes when
looking at a raw record, but it takes a few more bytes especially as the
fields get larger.  And as far as I know RPG still likes to convert
things to packed when it reads a file unless you tell it not to.  That
being the case is there still a performance issue these days?

We like zoned fields here, but I'm trying to address the issue from a
thorough technical standpoint.  If you're trying to be as lean as
possible, you could argue that integers should be stored in binary,
although that has its own issues.  Heck, an argument could be made that
you should store all data as integers with implied digits and decimal
positions.

What say you all?

Joe
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.