llpind wrote: > > I'm having some trouble reterieving a parameter return value from the service program im calling using ServiceProgramCall class. Below is the java code. > > It runs without any errors but the value returned is always zero. We even changed the service program to simply set the param to a hardcoded value. If i use AS400ZonedDecimal to convert, i get a ClassCastException!! anyone? thanks. > > Code <'http://www.mcpressonline.com/mc/showcode@@.6b371de2'> If the actual service-program parameter is zoned decimal, then using AS400Bin4 is not going to work. You have to match the parameter type. I think the problem is that ProgramParameter defaults to passing the parameter by value. Try this: parameterList[0] = new ProgramParameter(ProgramParameter.PASS_BY_REFERENC E, 100);
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Param return values on Service program calls from Java
Collapse
X
-
Param return values on Service program calls from Java
I'm having some trouble reterieving a parameter return value from the service program im calling using ServiceProgramCall class. Below is the java code. It runs without any errors but the value returned is always zero. We even changed the service program to simply set the param to a hardcoded value. If i use AS400ZonedDecimal to convert, i get a ClassCastException!! anyone? thanks.
Code
-
Param return values on Service program calls from Java
Thanks for your response.>I think the problem is that ProgramParameter defaults to passing the parameter by value. Try this:
>parameterList[0] = new ProgramParameter(ProgramParameter.PASS_BY_REFERENC E, 100);
Yes, thats what it was. I assumed the default was pass by reference. Thanks.
Comment
Comment