in reply to Re: Re: Re: H2 pack/unpack not working for negative numbers
in thread H2 pack/unpack not working for negative numbers

I was hoping to spare you the gory details, but...
This is coming from a proprietary closed platform called "Flex/OS" by IBM which is a stripped down OS/2 for retail registers running on x86 pc's. I have no choice in how the data is packed. I believe the application treats everything as strings or numbers. I cracked IBM's infamous "packed decimal compressed transaction logs" with an elaborate perl program (which works better than several other expensive commercial programs we have seen). All the data fields in this file are either ascii or packed decimal. Perhaps they chose wrong in deciding to pack a negative number, I was just hoping to find someway to unpack it correctly. Sadly, there are other fields which are correctly unpacked as "d1".
Kyle
  • Comment on Re: Re: Re: Re: H2 pack/unpack not working for negative numbers

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: H2 pack/unpack not working for negative numbers
by BrowserUk (Patriarch) on Dec 11, 2003 at 00:00 UTC

    OS/2 eh. That's my old stomping ground.

    Anyway, if you would post a small sample, encoded using MIME::Base64, along with a description of what you think the sample represents, I'll have a go at it. No guarentee's I'll do any better than you of course.

    You can encode the sample using

    perl -mMIME::Base64=encode_base64 -000e" print encode_base64( <> )" < sample >sample.b64

    and then paste it in a code block here.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!