× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Try using a FileWriter instead of a FileOutputStream.  Writers were
introduced in Java 1.1 and are the preferred way to do this sort of
encoding conversion.

> -----Original Message-----
> From: java400-l-admin@midrange.com
> [mailto:java400-l-admin@midrange.com] On Behalf Of Urbanek, Marty
> Sent: Monday, August 19, 2002 8:28 AM
> To: 'java400-l@midrange.com'
> Subject: Java writing EBCDIC
>
>
> 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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.