× 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.


  • Subject: Re: ProgramCall and ProgramParameter classes
  • From: "Dave Wall" <dawall@xxxxxxxxxx>
  • Date: Wed, 4 Apr 2001 15:10:18 -0500
  • Importance: Normal


I think the important considerations are:

1) How familiar are you with JDBC.  If you are already an expert at JDBC
then using JDBC procedure call is a natural way for you to call the
program.  If you don't know anything about JDBC but are already using some
other Toolbox component then you may go with ProgramCall just because that
is an interface you are used to.  If you don't know either then you have to
learn one.  I think ProgramCall is easier but that is just my opinion.

2) Complexity of the buffer.  Those of you who use AS/400 APIs know the
input and output buffers of many APIs are obviously created by committee.
They can be very complex with their multiple repeating variable length
structures.  For these types of buffers PCML is the way to go.  In a text
file you define the generic layout of the buffer.  At run time PCML does
all the messy math to address into the buffer to pull out fields.  PCML is
a little slower, however, so if your buffer is simple PCML may not be worth
the performance hit.

3) If correctly written, the performance of ProgramCall vs JDBC is about
the same, with PCML being a little slower.  Of the two, ProgramCall should
be slightly faster just because there is less overhead on the client and
server, but if your program takes any time at all you may not see a
difference.  In either case connect time is significant.  If you need to
call a program more than once you should use the same connection.  Toolbox
in JTOpen 2.02 has connection pooling to help you reuse connections for
both JDBC and ProgramCall

I look foward to see the performance numbers some of you are gathering, to
see if they match my number that ProgramCall is slightly faster.

David Wall
AS/400 Toolbox for Java


"Bruce Jin" <brucej@MRC-PRODUCTIVITY.COM>@midrange.com on 04/04/2001
08:53:10 AM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com


To:   <JAVA400-L@midrange.com>
cc:
Subject:  Re: ProgramCall and ProgramParameter classes




I really wish to know the advantages/disadvantages in using JDBC procedure
calls versus using Toolbox if my task is only to call RPG, CL, COBOL, and
REXX from Java.

Thanks.

Bruce


-----Original Message-----
From: Joe Pluta <joepluta@PlutaBrothers.com>
To: JAVA400-L@midrange.com <JAVA400-L@midrange.com>
Date: Tuesday, April 03, 2001 9:10 PM
Subject: RE: ProgramCall and ProgramParameter classes


>Actually, Bruce, I haven't done that much with JDBC procedure calls.  Do
you
>have an example of a simple program call?  I don't need much - I simply
pass
>a single parameter back and forth between Java and my RPG program, so if
you
>have an example program, I'd love to see it.
>
>Joe
>
>
>> -----Original Message-----
>> From: owner-java400-l@midrange.com
>> [mailto:owner-java400-l@midrange.com]On Behalf Of Bruce Jin
>> Sent: Tuesday, April 03, 2001 2:19 PM
>> To: JAVA400-L@midrange.com
>> Subject: Re: ProgramCall and ProgramParameter classes
>>
>>
>> Eric thanks for the info.
>>
>> I tried a few jdbc procedure calls and it appears that this approach is
>> quite handy to use in calling RPG, CL etc. I wonder why one should use
>> Toolbox.
>>
>> I found that:
>>
>> 1. JNI offers superb performance but it is not easy to use and it does
not
>> work with existing AS400 programs.
>> 2. ToolBox is not very easy to use.
>> 3. PCML is not easy to use.
>> 4. JDBC procedure call is very easy to use. And one does not have to use
>> jt400.zip file.
>>
>> Any comments anybody?
>>
>> Thanks
>> Bruce
>>
>> -----Original Message-----
>> From: Eric Merritt <cyberlync@yahoo.com>
>> To: JAVA400-L@midrange.com <JAVA400-L@midrange.com>
>> Date: Friday, March 30, 2001 2:36 PM
>> Subject: Re: ProgramCall and ProgramParameter classes
>>
>>
>> >Bruce,
>> >
>> > The sun JDBC trail provides a little information at
>> >http://java.sun.com/docs/books/tutorial/jdbc/basics/sql.html
>> >
>> >and a little more here
>> >
>> >http://developer.java.sun.com/developer/onlineTraining/Database/J
>> DBC20Intro
>> /JDBC20.html#JDBC2013
>> >
>> >as for setting up an RPG program as a stored procedure
>> >your will probably have to check one of the redbooks
>> >for that.
>> >
>> >
>> >--- Bruce Jin <brucej@mrc-productivity.com> wrote:
>> >> Eric could you provide a few resources (or links) on
>> >> using JDBC stored
>> >> procedures call?
>> >>
>> >> Thanks.
>> >> Bruce
>> >>
>>

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---



+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

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.