JZOS 1.2.1 and System.out.write(byteݨ bytes)

General discussion on the JZOS batch launcher and toolkit
Post Reply
ahulse
Posts: 1
Joined: Fri May 27, 2005 10:53 am
Location: Northwestern Mutual

JZOS 1.2.1 and System.out.write(byteݨ bytes)

Post by ahulse »

I updated from 1.1.2 to 1.2.1 and get the following in the STDOUT and STDERR output DDs now when I run the IVP Hello World:

_______________
Hello World! (stdout)
System.out.write(byteݨ bytes)
_______________

The second line was not there under 1.1.2 and does not look correct. This happens under both Java 1.3.1 and 1.4.2. I still get an RC=0000 from the step.

Any ideas or have I found something funny in 1.2.1? javascript:emoticon(':?')
Confused
_______________

Al Hulsebosch
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

This is not a problem.
In 1.2.1, we added code to the HelloWorld class to test transcoding of bytes written to System.out and System.error.

Sorry for the confuson; We will move the new code to a different testing class in a followon release, so as to avoid confusion.

BTW - here's the source for HelloWorld (this source is also part of the distribution).

/**
* Simple class used to verify that JZOS is properly installed.
*/
public class HelloWorld {

public static void main(String[] args) {
System.out.println("Hello World! (stdout)");
System.err.println("Hello World! (stderr)");
//By default, the following byte array should be written
//in the codepage set by JZOS_OUTPUT_ENCODING, even if
//file.encoding is different.
try {
System.out.write("System.out.write(byte[] bytes)".getBytes());
System.out.println();
System.err.write("System.err.write(byte[] bytes)".getBytes());
System.out.println();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}

}
Guest

Post by Guest »

Should the output report the number of bytes writen vs a string with unprintable charactors representing the brackets?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

The funny-looking characters are just brackets - []
To view brackets properly, your 3270 emulator should be set to a code page that supports them, like Cp1047 / IBM1047.
Post Reply