What you're referring to are not packed fields, but binary ones (which also
give the -32768 to 32767 range for two bytes) or even the new Integer data
types which exist in ILE-RPG.
Intel packed numbers are stored quite differently than OS/400's packed
numbers. Intel reverses the order of the bytes in numbers whereas windows
doesn't. Instead of saving the numbers low byte then high byte, (or vice
versa, I don't remember which) it stores them high byte then low byte.
Also, packed numbers in the AS/400 seem to use BCD as far as I can tell, and
not true integers. We know that a packed number on the AS/400 takes 1
nibble per character and one for the sign (a nibble is half a byte). Intel
packed integers, on the other hand, do not use BCD but use machine integers.
One byte (8 bits) in BCD can hold 0 to 9 in one nibble, or -9 to +9, Intel
integers, on the other hand, can hold -128 to 127. One of the reasons is
Intel only uses one bit (the high bit) for the sign, leaving 7 bits for the
number. In two bytes (4 nibbles) BCD
gives us -999 to +999 yet Intel gives us -32768 to +32767.
It should be possible to read these Intel numbers, either on the PC or the
AS/400, and convert them to OS/400's BCD with bit math.
The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, Merck & Co., Inc. All responsibility for the statements
made in this Usenet posting resides solely and completely with the