converting ebcdic to ascii
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
I need a program to convert my text from ebcdic to ascii. Is there any tutorial or code out there that will help me do this?
here's a function I used before: However, mine returns it as a string, so you'll have to do any other conversion on it yourself
CString EBCDICToDecimal(CString strValue) { CString chr; char cEnd; int nLength = strValue.GetLength(); cEnd = strValue[nLength - 1]; chr = ""; if((cEnd >= 65) && (cEnd <= 73)) cEnd -= 16; if(cEnd == 123) cEnd = 48; if(cEnd == 125) { chr = "-"; cEnd = 48; } if((cEnd >= 74) && (cEnd <= 82)) { chr = "-"; cEnd -= 25; } strValue = chr + strValue.Left(strValue.GetLength() - 1) + cEnd; return strValue; }
My articles www.stillwaterexpress.com BlackDice
-
I need a program to convert my text from ebcdic to ascii. Is there any tutorial or code out there that will help me do this?
See if this helps. In addition, there's these two:* http://support.microsoft.com/kb/216399/EN-US/
-
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q235856
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
-