Guess I posed the question wrong. I needed to convert IBM's packed 
decimals to an ascii string of numbers. Say in 4 byes I have a value 
0x1234567C

I need to see this value as '1234567' , the last 0xC being a sign 
indicator. I foud out that hex() can do this.

However even before this is a problem. When I get the file from the 
mainframe, it has already been converted to ASCII but these hex values 
will be translated to some unintelligble characters. 

This is a mess! I need to think through this. Firstly I need to know how 
the mainframe converts these packed decimals into ascii.

Apologize for the inconvenience, fellow  PMers!





Bob Rogers <[EMAIL PROTECTED]>

08/15/2003 07:04 PM

 
        To:     Ranga Nathan <[EMAIL PROTECTED]>
        cc: 
        Subject:        [Boston.pm] Separating out hexadecimals


   From: Ranga Nathan <[EMAIL PROTECTED]>
   Date: Fri, 15 Aug 2003 18:46:03 -0700

   I need to separate each hexadecimal (4 bit) into a separate byte.

   e.g  0x1234567C

   is to be separated into  ascii '1', '2', ...'C'

   I think this requires bit string manipulation.

   Can someone lead me to a solution? I am drawing a blank on what 
function 
   to use!

                 my @chars = split(//, $string);

[Don't feel bad; I've had days like that, too.]

  -- Bob Rogers
     http://rgrjr.dyndns.org/



_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to