×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




You haven't shown us how you are calling the subprocedure from Java. Without that we're just guessing,


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx



On May 13, 2026, at 2:03 PM, Luca Giammattei <luca.giammattei@xxxxxxxxx> wrote:

Hi everyone, I'm stuck with what I thought was a small problem but can't
seem to resolve.
From a Java class running on a Windows server, I need to:
1. connect to a certain IBM i power server; (done)
2. set a specific library list with a given custom command; (done)
3. call a service program procedure that returns a char(6) value. (And here
I'm stuck.)
Despite several attempts, the procedure, assuming it's actually executed,
doesn't produce any results.
This is the RPG prototype of the procedure:
dcl-pr RtvSupplierCode Char(6) EXTPROC('RtvSupplierCode');
codMec zoned(7:0) const options(*omit:*nopass);
vatCode char(16) const options(*omit:*nopass);
idColCode packed(13:0) const options(*omit:*nopass);
end-pr;

The returned char(6) field may also be empty.
The three parameters are alternative; those not passed must be marked with
the *OMIT placeholder. The possible values for the test are:
codMec=some numbers or vatCode=some numbers but as a string or
idColCode=again some numbers

Normally, the call in rpgile would be
supplierCode = RtvSupplierCode(1236547 : *omit : *omit);
supplierCode = RtvSupplierCode (*omit : '123456789012345' : *omit);
supplierCode = RtvSupplierCode (*omit : *omit : 12345);

Now on my class It just doesn't seem to work.

Has anyone ever used this call?
Does anyone have any working code examples I can try?
Thanks in advance for your attention.
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.