The B data type in DB2 is not the same a the B data type in RPG. In DB2,
an integer field will show up as B data type. B data types in RPG are
generally considered deprecated.
We have a file that is used by all of our clients, and it's a high volume
transaction table of sorts (adding 1 byte to the file equates to roughly
190mb of storage, assuming 200 million records total, and if I'm doing my
math right: 200,000,000 /1024 /1024). Because of this, and disk space,
there is resistance to adding new fields to the file. We have additional
disk budgeted, but who knows if that will get approved.
I have approval to add 5 identifier columns. I was going to add them as
9p 0 (5 bytes) each. However, I could get the same values for less
space if I used the B data type (9b 0), saving almost 1gb in storage.
In my 10+ years of RPG programming, I've never dealt with a B type on a
file (in fact, only ever in IBM supplied APIs, and even then I converted
them to integer types).
I did find that there is a EXTBININT header spec, but I don't really see
the purpose to using it (I mean I know you can then access the 10th digit,
in the case of 9b 0, but does that 10th digit get stored on the file?
Are there any gotchas to using the B data type?
CustomCall Data Systems, a division of Enghouse Ltd.