|
Hi, I'm using V4R5 host and Java Toolbox 4.2 (on WinXP/JSE1.4) as development platform. I'm trying to execute programs with ProgramCall but it fails with: -------- Thread[main,5,main] Mon Mar 01 10:51:05 EET 2004 Remote command server return code: 03 02 Thread[main,5,main] Mon Mar 01 10:51:05 EET 2004 Request not valid. ------- The latter is returned from as-rmtcmd host server. It fails only with program parameter buffer LONGER THAN 1024 bytes. With parameters up to 1024 bytes everything works fine. I tested working length with an ILE-C app. I need to use an RPG app that expects 3000 bytes input parameter. I can access the same app on the same host over CA/400 successfully. I have access to an V5R2 host as well. V5R2 doesn't have problems with program parameters longer than 1024 bytes. JTOpen homepage claims that Toolbox 4.2 is compatible with V4R5. Any ideas? regards, Tõnis Aruste Here is really simplified version of my application: ----------------------------------------------------------------- int len = 1025; // parameter buffer length AS400 conn = new AS400(); ProgramCall prog = new ProgramCall( conn); prog.setProgram("/QSYS.LIB/JOHN.LIB/PARMS.PGM"); ProgramParameter[] params = new ProgramParameter[1]; // tested both BY_VALUE and BY_REF params[0] = new ProgramParameter( ProgramParameter.PASS_BY_VALUE, new byte[len], len ); prog.setParameterList( params ); AS400Text text = new AS400Text(len,conn); prog.getParameterList()[0].setInputData(text.toBytes("Hello")); prog.run(); // this throws exception InternalErrorException // com.ibm.as400.access.InternalErrorException: Syntax error occurred. // at com.ibm.as400.access.RemoteCommandImplRemote.processReturnCode(RemoteCom mandImplRemote.java:440) // at com.ibm.as400.access.RemoteCommandImplRemote.runProgram(RemoteCommandImp lRemote.java:258) // at com.ibm.as400.access.ProgramCall.run(ProgramCall.java:608) .. -------------------------------------------------------
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.