This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes Conversion to Packed Data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Conversion to Packed Data " Watch "Conversion to Packed Data " New topic
Author

Conversion to Packed Data

Venkatesh Kumar
Ranch Hand

Joined: Aug 08, 2003
Posts: 68
Hi:

I am trying to generate a file that will be fed to AS 400.Part of the data ,
for eg :character position from 10-20 of every line in the file has to be
put in EBCDIC format .

Is there any utility classes (Open Source ) to convert data to packed data
format ??

I have found some sample code to convert decimal data (numeric data ) to packed format but none to convert to alpha numeric.In my case ,I will also have to convert some alphanumeric data into EBCDIC format.

I greatly appreciate any help.

Thanks ,

Venkatesh Kumar
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Here http://mindprod.com/products.html#TRT is a class called TRT that claims to do the translation. TRT is a System 360 assembler instruction used for all kinds of translations. Cute name for the class.

Here: http://www.room42.com/store/computer_center/java_translate.shtml is some code that I can't say I like very well. I'd rather use the ASCII character as an index into an array of EBCDIC characters.

Google for "ASCII EBCDIC conversion" or "ASCII EBCDIC java" for lots more.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conversion to Packed Data
 
Similar Threads
How to read a .cff (compressed file format) file in Java
Generating an EBCDIC file
ASCII TO EBCDIC conversion preserving COMP-3
Packed decimal conversion - Java
Packed decimal to normal Ascii integer conversion