|
I posted this to the RPG list but haven't received a response yet. Can someone please help me? ------- 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. Mike Wills Lawson Programmer/Administrator Taylor Corporation Email: mnwills AT taylorcorpNOSPAM DOT com AIM: iSeriesCodePoet
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.