× 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 Pluta skrev den 06-02-2008 16:53:
But in the case of bidirectional data calls, the two easiest solutions
are stored procedures and JTOpen ProgramCall calls. To me, which one to use depends on the business requirements. No big surprise there - Joe says that it's a business decision. But really, the decision is this: if you need to expose the business logic to people without strong Java skills, then stored procedures are the way to go. JDBC is pretty easy for just about any Java programmer. And stored procedures become especially attractive if you may need to expose the same logic to non-Java environments, such as .NET.

We use ProgramCalls at the moment (and since we use OPM Cobol we do not get the joy of getting the compiler to generate PCML, so I wrote some quite nice helpers for specifying signatures in code) and it works quite well but for the moment it is only to be used by in-house Java programmers. I like the idea of opening up to ANY programming language as long as it is capable of getting a SQL-connection to the iSeries, but we are very reluctant to bringing in new technology unless the benefits are very self evident. Stored procedures may help our legacy non-java-guru programmers.



On the other hand, if you're looking for the highest performance and the most control over your environment, ProgramCall is the way to go. With JTOpen, it's quite easy to create a persistent connection to the host, which means that you will have a dedicated QZRCSRVS job running on the System i which you can then control to the tiniest detail. You can set the library list, you can call programs that don't set on *INLR, you can leave files open and SQL cursors, all kinds of things that lead to a much higher performance than a non-persistent (stateless) connection.
Does that mean that if even you keep your database connection open, you cannot benefit from having this environment set? I was envisioning some kind of session object.


So, to me the question is simple: am I writing a high-performance application for authenticated users, or am I willing to give up a little performance in return for a little more flexibility in access methods? If neither is the case, then it comes down to the data: it's easier (in my opinion) to pass complex data with ProgramCall than with stored procedures because ProgramCall supports data structures very nicely. So in the end, I tend to favor the ProgramCall technique.
Thanks for a very thorough answer. It is appreciated.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.