× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Joe,

What about when the RPG has a few tables to open up and access?  If you
called the same RPG program say 100 times, and the RPG program accessed say
5 DB2/400 tables, wouldn't it re-open those tables on every call?  With an
RPG program calling another RPG program you can get it to keep the tables
open so you don't have this overhead each time but when calling from Java
isn't a totally new RPG environment on each call and so there'd be a huge
overhead every time of opening up all the tables?  This is the kind of
thing which worries me about calling RPG from Java - not the speed of the
program call itself.

Thanks,

Nigel Gay.



|---------+------------------------------>
|         |           "Joe Pluta"        |
|         |           <joepluta@plutabrot|
|         |           hers.com>          |
|         |           Sent by:           |
|         |           java400-l-bounces@m|
|         |           idrange.com        |
|         |                              |
|         |                              |
|         |           11/03/2004 13:27   |
|         |           Please respond to  |
|         |           Java Programming on|
|         |           and around the     |
|         |           iSeries / AS400    |
|         |                              |
|---------+------------------------------>
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                 |
  |       To:       "'Java Programming on and around the iSeries / AS400'" 
<java400-l@xxxxxxxxxxxx>              |
  |       cc:                                                                   
                                 |
  |       Subject:  RE: Mixed RPG/Java performance (EXAMPLE CODE)               
                                 |
  
>--------------------------------------------------------------------------------------------------------------|




> 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

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.








********************************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.
********************************************************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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