No problema... if you want to really go down the AS400 jt400 direct procedural things maybe PCML would provide less clunky a contract via the document call. Still not pretty.
BUT
In case one want or can reconsider the way to access the info, the prototype you posted seems a simple lookup, without side effects, that doesn't requiring precise synchronous semantics or other exoterica.
Staying in the client-server jt400 world nowadays the "beaten path" is via db interface (that you can use it then via multiple languages, odbc etc).
A direct SELECT to retrieve (and much more generic, extensible when you need the full set of attributes...) via view or UDFT can be simpler, testable interactively, quick to evolve etc. and up very fast, the client can project and ask the field needed etc.










On Friday, May 15, 2026 at 02:08:33 PM GMT+2, Luca Giammattei <luca.giammattei@xxxxxxxxx> wrote:





Il 15/05/2026 11:23, cesco via RPG400-L ha scritto:
Ciao Luca,
It's been a lot since I've coded some calls into RPG via jt400 (too clunky), but apparently you cannot return chars, check docs.
https://www.ibm.com/docs/api/v1/content/ssw_ibm_i_74/rzahh/javadoc/com/ibm/as400/access/ServiceProgramCall.html#setReturnValueFormat(int)
If you really want to go that way you need to lift the return into a parameter (explicitely or via RTNCODE maybe) or just a wrapper.

Maybe an idea is to use simple database access to expose such data, i.e. stored procedure that you can reuse than universally (JDBC from java, ODBC etc.).

ciao


Thx Cesco, really too clunky, almost useless (I mean the service program call class)

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.