Solved

ASCII to EBCDIC conversion and vice versa

Posted on 2002-07-02
4
689 Views
Last Modified: 2010-09-23
i'm currently developing a utility to convert ASCII to EBCDIC (to support translation of some bits in a legacy system). really stuck over here.

some sample codes are appreciated. hope someone here can guide me (either conceptually or otherwise).
0
Comment
Question by:emily_my
  • 2
  • 2
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 7125123
Conceptually, what you need to do is build a conversion table. For EBCDIC to ASCII, you would read a character in EBCDIC, find the ASCII equivalent in the table and write that out to a stream or file. The process would be reversed for ASCII to EBCDIC.
0
 
LVL 4

Expert Comment

by:pagladasu
ID: 7125238
here is a link to a piece of code in C that might be useful to you.
http://www.room42.com/store/computer_center/c_translate.shtml
0
 
LVL 4

Accepted Solution

by:
pagladasu earned 50 total points
ID: 7125248
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 7128699
pagladasu, that certainly is a start, but there are some problems: in descending order of importance:

1. If performance is an issue, e.g. in decoding long streams, constantly iterating the array like this is inefficient. In this respect, the C code is better.
2. The Java code uses proprietary code.
3. It doesn't translate both ways, as claimed

emily_my, you only need (maybe) to concern yourself with the first point.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now