MIDRANGE dot COM Mailing List Archive



Home » JAVA400-L » August 2002

Java writing EBCDIC



fixed

My java program runs on the AS/400 and creates a file using
FileOutputStream. Everything works fine as long as the file is in IFS. For
example if the output file is /home/mydir/myfile the data is written in
ASCII, CCSID 819. However, if I write to
/qsys.lib/mylib.lib/myfile.file/myfile.mbr the data representation appears
to still be ASCII.

I am pre-creating the file using CRTPF FILETYPE(*DATA) which forces CCSID
65535. I presume this is why java can't figure out how to convert the data.

How do I tell the java program to write the data as EBCDIC? Do I have to
convert it myself? I am looking at the BidiTransform class in the IBM
Toolbox for Java. Is this appropriate?

I also need to read data from both IFS and QSYS.LIB. Will the same technique
apply?

THANKS,
-Marty






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact