What is the CCSID of the file that is created?
Dan Feather
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kelly Cookson
Sent: Wednesday, October 19, 2005 2:03 PM
To: Java Programming on and around the iSeries / AS400
Subject: RE: IFSFileWriter problem: unusual output in IFS file
I just tried DSPF, and it looks the same way:
************Beginning of data**************
a n e w t e s t
************End of Data********************
A space between each character.
Any ideas?
Thanks,
Kelly
-----Original Message-----
From: java400-l-bounces+kcookson=dotfoods.com@xxxxxxxxxxxx
[mailto:java400-l-bounces+kcookson=dotfoods.com@xxxxxxxxxxxx]On Behalf
Of Franco Biaggi
Sent: Wednesday, October 19, 2005 1:27 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: IFSFileWriter problem: unusual output in IFS file
Kelly Cookson wrote:
>We want to write text strings to a file in the IFS. We can write to the
IFS file, but each letter is separated what looks like a tab, and the
end-of-line characters are unusual.
>
>Here's the exact code:
>
>
> public static void main(String[] args) {
> AS400 system = new AS400("mysystem", "myname",
"mypassword");
> IFSFile file = new IFSFile(system,
"/home/mydir/writeifs_test.txt");
> try {
> PrintWriter myWriter = new PrintWriter(new
BufferedWriter(new IFSFileWriter(file)));
> myWriter.println("a new test");
> myWriter.close();
> } catch (Exception e) {
> e.printStackTrace();
> }//end-try-catch
> }//end-main
>
>The content of the writeifs_test.txt file in Notepad looks like this:
>
> a n e w t e s t
>
>There are also two special characters (boxes) at the end of the line
that are not showing up in this email message. When I open it in
WordPad, I see a box between each letter of "a new test."
>
>It's not an issue of translation when moving the file from the IFS to
my desktop (via Navigator drag and drop), because I can move other text
files from the same IFS directory to my desktop with no problems.
>
>Any help would be greatly appreciated.
>
>Thanks,
>Kelly
>
>
>
Hi,
have you tried to see the file natively with DSPF or EDTF ?