| Author |
ASCII TO EBCDIC: how ?
|
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
Hi, I want to write the highest value of the EBCDIC data into an ASCII file in Java. In other words, I only to need to produce one value, and this value corresponds to the highest value in EBCDIC. Thanks for your help.
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
|
 |
Norm Radder
Ranch Hand
Joined: Aug 10, 2005
Posts: 681
|
|
Not sure what you are asking. What is the 'highest value of the EBCDIC data'? Do you have a file with EBCDIC data you want to convert to ASCII? What is a value? A single byte? Like xFF? Could you explain your problem a bit more and perhaps give an example?
|
 |
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
Hi, thanks for replying. Well, I do not know much about EBCDIC. I will give more details: I am working on Windows XP, using Eclipse. I am writing a batch that will generate an ASCII file which will be read by another program in a mainframe environment. They have asked me to include in that line the xFF EBCDIC value. How do I do that ? Thanks
|
 |
Stuart Gray
Ranch Hand
Joined: Apr 21, 2005
Posts: 410
|
|
Well a value such as xFF is just a value. The difference between ASCII, ANSI, EBCDIC, etc is how the values are interpreted. For example, the value 75 (decimal) is a 'K' in ASCII, but a full stop (period) in EBCDIC. This link has a table of ASCII and EBCDIC codes side by side, though I'm sure you can easily find nicer ones with Google.
|
 |
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
thanks very much again for the info, much appreciated
|
 |
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
Does anyone know of a concrete example on how to convert a single ASCII character into a EBCDIC one ? Thanks !
|
 |
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
can anyone help me here, please ? It's urgent
|
 |
Jiang Xiaofeng
Greenhorn
Joined: Jul 19, 2005
Posts: 25
|
|
Originally posted by Max longbeach: can anyone help me here, please ? It's urgent
This looks like a good starting point: http://www.dynamoo.com/technical/ascii-ebcdic.htm
|
 |
Norm Radder
Ranch Hand
Joined: Aug 10, 2005
Posts: 681
|
|
To convert one byte to another: Create a 256 byte table with the target values and use the source value as an index. For example say you want to map x01 to x07:
|
 |
 |
|
|
subject: ASCII TO EBCDIC: how ?
|
|
|