This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Converting ASCII hexadecimal data to EBCDIC hexadecimal data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Converting ASCII hexadecimal data to EBCDIC hexadecimal data" Watch "Converting ASCII hexadecimal data to EBCDIC hexadecimal data" New topic
Author

Converting ASCII hexadecimal data to EBCDIC hexadecimal data

Tejeswar Peetha
Greenhorn

Joined: Mar 26, 2006
Posts: 5
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


Tejeswar. P
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 454
    
    1

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

Joined: Sep 07, 2004
Posts: 781

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?


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Tejeswar Peetha
Greenhorn

Joined: Mar 26, 2006
Posts: 5
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

Joined: Sep 07, 2004
Posts: 781

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting ASCII hexadecimal data to EBCDIC hexadecimal data