HP3000-L Archives

November 2005, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Fri, 25 Nov 2005 14:41:22 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
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 *

ATOM RSS1 RSS2