in reply to EBCDIC & COMP-3 *shriek*

Hi Grygonos,

Have a look at Convert::IBM390. This module has conversion functions for data in those formats. I have successfully used it to unpack COMP-3 packed fields.

Regards,
Dom.

Replies are listed 'Best First'.
Re: Re: EBCDIC & COMP-3 *shriek*
by Anonymous Monk on Jan 23, 2004 at 12:32 UTC
    Thanks for all the replies monks. What I'm doing is translating a data dump from our clients mainframe. I can't get them to convert it...I'm by no means in a position of authority in this case. This IBM convert module may work. I REALLY hope it does. Thanks for all the great information.
      Sorry the above AM is me.. forgot to login.

      Grygonos
      Be very careful with that module. I have an example of where a client made the zipcode packed decimal. Convert::IBM390 loses leadind zeros. So, 02354 becomes 2354. Not what you want.
Re: Re: EBCDIC & COMP-3 *shriek*
by jhorner (Initiate) on Mar 10, 2004 at 03:20 UTC
    Grygonos,

    Convert::IBM390 works very well at converting COMP-3 to the ASCII world. I'm currently writing a generic ebcdic2ascii.pl translator, which given a map file will spit out comma separated value files.

    But, if you need to convert lots of EBCDIC string data to ASCII, a simple "dd conv=ascii if=infile of=ofile" will serve you lots faster.

    Cheers,

    jhorner