Length of Integer

Gergely_Pongracz

Well Known Member
Hi List,
I found something strange in Data Dictionary of OneWorld Xe. If I try to add an integer-type item (code 15) the length of this item is 11 which cannot be changed - however most old integer types like INT01 have length of 4. Most old items have length 4, some 8 and there are only a few with length 11.
Does anybody know why it is so and what 11 means (it cannot be 11 bytes...) ???
Regards:
Gergely Pongrácz
e-Best
Hungary
 
At our site, those of us with software development backgrounds have had discussions at length with those with JDE/business backgrounds about how JDE stores numerics. It seems that JDE stores a numeric value based on it's length in characters. Therefore, an 11 digit integer seems to be stored as 11 characters, which is 11 bytes. That's 88 bits. BCD (binary coded decimal) would allow one to store 11 digits in 37 bits (38 if you add a sign bit), which rounds to 42 bits, or 6 bytes. Hmmm. 6 bytes or 11 bytes. Repeat this 32 million times throughout the database and it seems to be a huge waste of space.

Though... I don't have a full ins-and-outs background in JDE. Am I wrong about JDE storing numerics as one-byte-per-digit?
 
Thanks Jack,
The way JDE stores data can have two meanings - in programming code and in database. That can cause great confusions for example regarding Julian Dates and JDEDATE.
Numerics are stored in the database as they should be - numbers, so there is no waste of time there. There are no integers in the standard OneWorld tables.
In programming code (C code) math numeric (floating point values) are stored as a structure (MATH_NUMERIC) and integer as normal C integer - the size has to depend on the architecture.
My problem arose at a third party interface from which I was able to call OneWorld Business Functions as long as there was no integer in the data structure. The usage of integer caused a 2-byte shift in the positions of parameters in the data structure which meant I wasn't able to use them.
My investigation very soon arrived at the DD size of integer where I found this strange thing.
Regards:
Gergely
 
Back
Top