Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 98464 invoked from network); 26 Sep 2002 21:04:05 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Sep 2002 21:04:05 -0000 Received: (qmail 27912 invoked by uid 97); 26 Sep 2002 21:04:48 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 27896 invoked by uid 97); 26 Sep 2002 21:04:48 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 27882 invoked by uid 50); 26 Sep 2002 21:04:47 -0000 Date: 26 Sep 2002 21:04:47 -0000 Message-ID: <20020926210447.27881.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 13047] New: - Support for and on OS/400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13047 Support for and on OS/400 Summary: Support for and on OS/400 Product: Ant Version: 1.5 Platform: All OS/Version: OS/400 Status: NEW Severity: Enhancement Priority: Other Component: Core tasks AssignedTo: ant-dev@jakarta.apache.org ReportedBy: brian_farrar@countrywide.com The tags... do not work properly under OS/400. The problem is that the output from the QSH commands is EBCDIC. The output must be converted so it is appropriate for Java. I have made the appropriate changes to the 1.5 release to accomplish this and request that these changes be reviewed and considered for placement into the product. The files affected and the differences are attached. I believe that there is also a bug in the org.apache.tools.ant.taskdefs.Execute.toString (ByteArrayOutputStream bos) method. It attempts to convert the byte array encoding for z/os, but does not actually return the encoded string. This is a moot point because the encoding conversion belongs in a different place anyways (along with the os/400 encoding in the StreamPumper class.) Source Differences: diff -r ant/src/main/org/apache/tools/ant/taskdefs/Execute.java ant400/src/main/ org/apache/tools/ant/taskdefs/Execute.java 237a239,241 > } else if (Os.isFamily("os/400")) { > String[] cmd = {"env"}; > return cmd; 262,267d265 < if (Os.isFamily("z/os")) { < try { < bos.toString("Cp1047"); < } catch (java.io.UnsupportedEncodingException e) { < } < } diff -r ant/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java ant400/src/ main/org/apache/tools/ant/taskdefs/StreamPumper.java 59a60,61 > import java.io.ByteArrayOutputStream; > import org.apache.tools.ant.taskdefs.condition.Os; 88a91,114 > public static byte [] recode(byte [] buf, int length) { > byte [] rbuf = null; > if (Os.isFamily("z/os")) { > try { > ByteArrayOutputStream bos = new ByteArrayOutputStream(); > bos.write(buf, 0, length); > rbuf = (bos.toString("Cp1047")).getBytes(); > } catch (java.io.UnsupportedEncodingException e) { > } > } > else if (Os.isFamily("os/400")) { > try { > ByteArrayOutputStream bos = new ByteArrayOutputStream(); > bos.write(buf, 0, length); > rbuf = (bos.toString("Cp500")).getBytes(); > } catch (java.io.UnsupportedEncodingException e) { > } > } > else > { > rbuf = buf; > } > return rbuf; > } 106c132,133 < os.write(buf, 0, length); --- > byte [] rbuf = recode(buf, length); > os.write(rbuf, 0, length); diff -r ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java ant400/src/ main/org/apache/tools/ant/taskdefs/condition/Os.java 102a103 > *
  • os/400
  • 216a218,219 > } else if (family.equals("os/400")) { > isFamily = osName.indexOf("os/400") > -1; -- To unsubscribe, e-mail: For additional commands, e-mail: