EBCDIC <--> ASCII conversion

Jeffrey P. Bakke bakke at plains.NoDak.edu
Thu Oct 11 06:21:19 AEST 1990


In article <661 at modus.sublink.ORG> luke at modus.sublink.ORG (Luciano Mannucci) writes:
> In article <1756 at dinl.mmc.UUCP>, noren at dinl.uucp (Charles Noren) writes:
> > We are communicating between Sun 3 (with SunOS 4.0.3) and an
> > IBM Mainframe (don't know the model, we're not IBM jocks)
> > via TCP/IP.  Our question, is there any program in Netland
> > that converts back and forth between EBCDIC and ASCII
> > (preferrably in C, but we will take any example)?
> 
> Apologies for posting C code in the wrong newsgroup.
That's alright, its always interesting to me.  Anyway, if you're on a Sun
system, an easier way would be to send the file over from the IBM to the
Sun, and then use the dd program.  This program allows file copies with
translation.  There are options to translate from EBCDIC to ASCII and vice
versa.  You'd have to look through the man pages.  But this will probably
do what you have to.  The 'dd' program is part of the standard SunOS 
installation tape I believe.  It should be located in the /usr/bin directory.

No need to write your own conversion program if the utilities already
exist.

-- 
Jeffrey P. Bakke               Internet: bakke at plains.NoDak.edu 
                      UUCP    : ...!uunet!plains!bakke
           BITNET  : bakke at plains.bitnet  



More information about the Comp.lang.c mailing list