|
> You have a problem. I can call a program hundreds of times a second,
> and that's from my PC to my little model 270. I included the RPG
> program, the Java program and the results at the end of this post.
CODE FOR EXAMPLE:
Program SB0001 in library SANDBOX
d xidata ds
d counter 5 0
d xwcount s 5 0
C *entry plist
C parm xidata 5
C
C eval xwcount = xwcount + 1
C eval counter = xwcount
C return
Java class CallSB0001
public class CallSB0001 {
private static AS400Text at5 = new AS400Text(5);
public static void main(String[] args)
throws Exception
{
AS400 sys = new AS400();
ProgramCall pc = new ProgramCall(
new AS400(),
"/QSYS.LIB/SANDBOX.LIB/SB0001.PGM",
new ProgramParameter[] {
new ProgramParameter(5)
});
SimpleDateFormat sdf = new
SimpleDateFormat("hh:mm:ss.SSS");
for (int x = 0; x < 100; x++)
{
pc.run();
String data = (String)
at5.toObject(pc.getParameterList()[0].getOutputData());
String date = sdf.format(new Date());
System.out.println(date + " " + data);
}
sys.disconnectAllServices();
System.exit(0);
}
}
Selected Results:
10:32:24.938 00001
10:32:24.938 00002
10:32:24.938 00003
10:32:25.016 00049
10:32:25.016 00050
10:32:25.016 00051
10:32:25.125 00098
10:32:25.125 00099
10:32:25.125 00100
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.