Xref: utzoo comp.unix.questions:25094 comp.unix.ultrix:4368 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.unix.questions,comp.unix.ultrix Subject: Re: EBCDIC to ASCII conversion under ULTRIX Message-ID: <1990Aug29.202732.18375@mp.cs.niu.edu> Date: 29 Aug 90 20:27:32 GMT References: <90240.091342HASKINS@MAINE.BITNET> <1990Aug29.184831.1216@pilikia.pegasus.com> Organization: Northern Illinois University Lines: 18 In article <1990Aug29.184831.1216@pilikia.pegasus.com> art@pilikia.pegasus.com (Art Neilson) writes: >In article <90240.091342HASKINS@MAINE.BITNET> HASKINS@MAINE.BITNET (Robert D. Haskins) writes: >>Does anyone know how to convert a file that is in EBCDIC format to ASCII >>format? Is there a command/program to do this under UNIX/ULTRIX ? If not, >>does anybody know of a public domain program to do the conversion? > >This is really easy to write in C, just declare a static array of 256 >unsigned chars and initialize it with the numeric values of the ASCII >characters. Make sure the array position corresponds to the EBCDIC value >as you will use the EBCDIC value as the indice into the array, like so: > Before implementing this program, you might check to see if the options available on the 'dd' command are suitable for the intented purposes. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940