Xref: utzoo comp.unix.misc:298 comp.lang.c:32776 Path: utzoo!attcan!uunet!ogicse!plains!bakke From: bakke@plains.NoDak.edu (Jeffrey P. Bakke) Newsgroups: comp.unix.misc,comp.lang.c Subject: Re: EBCDIC <--> ASCII conversion Message-ID: <6230@plains.NoDak.edu> Date: 10 Oct 90 20:21:19 GMT References: <1756@dinl.mmc.UUCP> <661@modus.sublink.ORG> Organization: North Dakota State University, Fargo Lines: 24 In article <661@modus.sublink.ORG> luke@modus.sublink.ORG (Luciano Mannucci) writes: > In article <1756@dinl.mmc.UUCP>, noren@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@plains.NoDak.edu UUCP : ...!uunet!plains!bakke BITNET : bakke@plains.bitnet