|
With more in depth searching. I found this website: http://www.bluewell.nl/en/bwo/03E01/03E0101.htm. It seems to do the trick. I will post my source in the FAQ! Mike Wills Lawson Programmer/Administrator Taylor Development Email: mnwills@xxxxxxxxxxxxxx Direct Line: (507) 386-3187 -----Original Message----- From: Wills, Mike N. (TC) Hello all, I can't seem to get this to work. I have seen some references to using Sting.getBytes(), but that doesn't seem to work. Here is my subprocedure: P*-------------------------------------------------- P* Procedure name: cvtFromString P* Purpose: Convert from java String to os/400 character P* Returns: Returned os/400 string P* Parameter: javaString => String in java format P*-------------------------------------------------- P #cvtFromString B EXPORT D #cvtFromString PI 3276A D javaString O CLASS(*JAVA: String) D CONST D newString PR O ExtProc(*Java: String: *Constructor) D mystring O Class(*Java: String) CONST D getBytes PR 65535A ExtProc(*JAVA: String: 'getBytes') D txtField S 65535 D mystring S O Class(*Java: String) /FREE monitor; mystring = newString(javaString); txtField = getBytes(mystring); // debug stmt return getBytes(mystring); on-error *all; return *blanks; endmon; /END-FREE P #cvtFromString E When I check txtField I get '0'. The result should be '7037'. Does anyone have any ideas what is wrong with my program? There should be a FAQ on this.
As an Amazon Associate we earn from qualifying purchases.
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.