• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting ASCII hexadecimal data to EBCDIC hexadecimal data

 
Tejeswar Peetha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to convert the data from ASCII hexadecimal to EBCDIC hexadecimal form
For Ex:
If I enter 0A, it should return SMM
If I enter 4C, it should return <
The complete list of ASCII - EBCDIC convertion is available at http://www.natural-innovations.com/computing/asciiebcdic.html

Can anyone please help me
 
Claude Moore
Ranch Hand
Posts: 817
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i'm not wrong, EBCDIC is AS400 (i5) encoding system... why don't you try with JTOpen or IBM Toolbox ? There should be
some utility classes that might help you in dealing with EBCDIC <-> ASCII conversion...

Good work !
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tejeswar PP wrote:Hi,

I want to convert the data from ASCII hexadecimal to EBCDIC hexadecimal form
For Ex:
If I enter 0A, it should return SMM
If I enter 4C, it should return <
The complete list of ASCII - EBCDIC convertion is available at http://www.natural-innovations.com/computing/asciiebcdic.html

Can anyone please help me


I'm not sure that this makes sense. The cited reference indicates that the 0x0A is the EBCDIC code for SMM and 0x4C is the EBCDIC for < so no conversion is necessary.

What format is your input? Are you asking that if you enter the characters '0' and then 'A' using the keyboard you want to convert this to a byte containing 0x0A?
 
Tejeswar Peetha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi james & Claude,

Thanks for your quick reply. I have enclosed my input file
My requirement is to divide the file contents into header, data and footer
1. Header: First 8 bits
2. Data : next 4 bits after header contains the size of actual file data
3. Footer
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tejeswar PP wrote: I have enclosed my input file


Err ... I don't visit this site that often so I don't know all the details of where to find things but where do I find this file?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic