HP3000-L Archives

February 1998, Week 3

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:
Jerry Fochtman <[log in to unmask]>
Reply To:
Jerry Fochtman <[log in to unmask]>
Date:
Wed, 18 Feb 1998 07:31:43 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
At 11:14 AM 2/17/98 +0000, Frank Letts wrote:
>I'm having trouble finding this in the books.
>Image database has P08 & P12 items. What data types should we map them
>to for access? float8?
>tanks,
>[log in to unmask]

If I remember my COBOL correctly, they would map to:

        P08 -   PIC S9(7) COMP-3
        P12 -   PIC S9(11) COMP-3

In 'C' and PASCAL these fields are 'generally' referenced as
character arrays, but these languages do not provide for direct
interpretation without the program explicitly examining the
half-bytes (nibbles).  (I seem to recall PL/1 having direct
nibble access, but that was in another life >20 years ago.... :)
COBOL tends to be easiest language for accessing packed decimal
values, as it is directly built-in to the language definitions.

These are not 'floating point' values, but rather 4-bit nibbles, each
containing a single digit with the last nibble reserved for the sign
indicator (positive, negative or unsigned).  However, with COBOL you
could have an 'implied' decimal position in the value by:

                 PIC S9(4)V9(3) COMP-3.

The value is still stored without any decimal indication.  So even
though COBOL might view the value as "1234.567", it would still be
stored as "1234567".  It is up to all processes which access the
data to know of the implied precision.



/jf
                              _\\///_
                             (' o-o ')
___________________________ooOo_( )_OOoo____________________________________

                        Wednesday, February 18th

___________________________________Oooo_____________________________________
                            oooO  (    )
                           (    )  )  /
                            \  (   (_/
                             \_)

ATOM RSS1 RSS2