>>>>> "RN" == Ranga Nathan <[EMAIL PROTECTED]> writes:

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

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

hex converts a hex string to its binary value. i am still not sure what
your input/output specs are.

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

what does that mean? 

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

good question. possibly they were converted to ebcdic (in hex form) and
then to ascii. or left as ebcdic and you think they are ascii which will
make them look like gibberish. the standard unix utility dd can convert
ebcdic to ascii which may be useful.

we need to know accurate specs here as so many possible things could
have been done to the data.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to