Convert Packet decimals comp-3 and comp-6
Peter W A Wood
peterwawood at gmail.com
Mon May 9 08:50:25 EDT 2011
Josep
On 9 May 2011 18:28, JosepM <jmyepes at mac.com> wrote:
> Hi Peter,
>
> So PIC9(5) COMP-3 is 5 bytes / 2 = 2.5 rounded to 3 bytes?
No, PIC9(5) is a 3 byte field - 5 digits + sign - each of which is 4 bits long.
When a PIC9(5) field is included in a record the compiler might insert
a 'padding' byte so that the next field starts on a 'word' boundary.
I'm fairly certain that IBM COBOL pads records, I don't know about ACCUCOBOL.
> Also I see that the first record contain some garbage or almost I don't have
> idea how decode it.
>
It is probably a header record.
Regards
Peter
More information about the use-livecode
mailing list