On 2026-05-13 2:03 p.m., Luca Giammattei 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,
...

To check whether the procedure is actually executed, add a bit of code to do something to the system that you can check before and after your test. Such as update a data area.

// CRTDTAARA MYLIB/MYDTAARA TYPE(*CHAR) LEN(100)
dcl-ds dtaara len(100) dtaara('MYLIB/MYDTAARA') qualified;
msg char(20);
*n char(1);
job char(28);
*n char(1);
tstamp timestamp;
end-ds;
dcl-ds pgmstat psds qualified;
jobname char(10) pos(244);
jobuser char(10) pos(254);
jobnum char(6) pos(264);
end-ds;

in *lock dtaara;
dtaara.msg = 'I am here';
dtaara.job = %trim(pgmstat.jobnum) + '/'
+ %trim(pgmstat.jobuser) + '/'
+ %trim(pgmstat.jobname);
dtaara.tstamp = %timestamp();
out dtaara;

After your test
DSPDTAARA MYLIB/MYDTAARA


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.