Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ASCII TO EBCDIC: how ?

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Norm Radder
Bartender
Posts: 1355
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks very much again for the info, much appreciated
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know of a concrete example on how to convert a single ASCII character into a EBCDIC one ?

Thanks !
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone help me here, please ?
It's urgent
 
Jiang Xiaofeng
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1355
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic