SOS: C Routines for ASCII to EBCDIC Conversion and Vice-versa

Gary Heston gary at sci34hub.sci.com
Fri Jun 21 22:57:10 AEST 1991


In article <1991Jun19.190752.28034 at ssdc.honeywell.com> satya at ssdc.honeywell.com (Satya Prabhakar) writes:

>I am involved in developing the ISO/RDA protocol between CDC 920
>and IBM 3090.  CDC 920 uses ASCII representation and the IBM
>uses EBCDIC. I am looking for C routines that convert ASCII strings
>into EBCDIC strings and vice-versa.  We need these DESPERATELY and
>asap. If you have some information re: these, please let me know
>asap. I would REALLY appreciate your help.

Well, let's see--this is a hard one, seeing as how it's a C programming
problem, of course it's posted to comp.lang.c, isn't it?

>Newsgroups: comp.protocols.ibm,comp.protocols.iso,comp.protocols.tcp-ip,comp.unix.questions

Oops, guessed wrong on that one...

Try building a 256 by 2 char array, initializing [x,0] with the EBCDIC
code set and [x,1] with the ANSI (it hasn't been ASCII for many years) 
code set, so that you can use the character as the offset to find out
what it converts to.

Typing in the initialization strings are left as an exercise to the
programmer. (You could do this with pointers, but that's a little
more complicated, and you said you were in a hurry.)

>Very many thanks in advance.

Anytime.

-- 
Gary Heston   System Mismanager and technoflunky   uunet!sci34hub!gary or
My opinions, not theirs.    SCI Systems, Inc.       gary at sci34hub.sci.com
I support drug testing. I believe every public official should be given a
shot of sodium pentathol and ask "Which laws have you broken this week?".



More information about the Comp.unix.questions mailing list