× 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.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
65535 means no conversion.  Create the file with an EBCDIC CCSID and then
it should convert for you automatically.  You would probably need to
either use JDBC and Create Table or have a dummy PF created with DDS that
you duplicate instead of using CRTPF because I do not think you can assign
a CCSID to a file created by CRTPF with a RCDLEN() specified.

You could also possibly use a source PF if it worked for your needs.

Mark









"Urbanek, Marty" <Marty_Urbanek@stercomm.com>
Sent by: java400-l-admin@midrange.com
08/19/2002 11:27 AM
Please respond to java400-l


        To:     "'java400-l@midrange.com'" <java400-l@midrange.com>
        cc:
        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
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.