Subject: | |
From: | |
Reply To: | |
Date: | Fri, 25 Nov 2005 14:41:22 EST |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Pete asks:
> I'm looking at a field in a dataset. It's an X40 field but it seems that
the
> data stored in it is server integers "packed" by a Cobol program. I've
used
> the program to change the values that are stored in this field and the
data
> is indeed changing but I cannot figure out how the data is actually
stored.
> Is there a formula on how one would unpack a field that has been packed by
a
> Cobol program?
I would expect that the data is packed in the standard manner: each nibble (4
bits) in the pattern is a binary encoded decimal ranging from 0 ("0000") to 9
("1001"), except for the last nibble, which is the sign of the number. If no
sign value is specified, the last nibble is the hex value"F" ("1111").
Otherwise, it's a "C" (credit; "1100") for a positive value, "D" (debit; "1101") for
a negative value.
Wirt Atmar
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|