Calling RPGLE Procedure returning 10 length char value from Java

5 pts.
Tags:
AS/400
Java
RPGLE
Hi, I need to call a RPGLE procedure which is in a NOMAIN module and returning a 10 char. Example of the procedure I need to call is as follows:
PRtvChgDesc       B                   Export
dRtvChgDesc       PI            10
d  P_Name                            6    Const
If possible please provide a sample code or example. I am being able to call the procedure from Java using the API ServiceProgramCall.  The problem I am facing is unable to get the return value which in this case is 10 char. Thank You, Roy.

Software/Hardware used:
AS400 + RPGLE + JAVA

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta

    As documented, the Class ServiceProgramCall cannot have a CHAR(10) return value.

    • The return value must be void or numeric. This class does not support calling service programs that return a pointer.

    Apparently, if you're going to have a "return value" rather than an Output or InputOutput parameter, you'll need to create a wrapper proc to call your service program proc.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following