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



My orginal question was

Data Ques/MQ Series vs Stored Procedures not
HLL vs SQL

Yes I use HLL for stored procedures thats why they are so fast, To me data
que is good for passing only one limited message.  But not for large amount
of data.

How do you bring 1000 records back to your java program?  I hope you don't
loop your code to do that or try to retrieve an unlimitted amount of data
using one parameter :-) (You have to call AS/400 1000 times).  Comparing to
one call using Stored Procedure. (performance). If you do how do you parse
the retrieved data from data que?  2200 bytes? Just wondering whats in it.
Stored procedure returns you the data in much simpler and better way.
Building one SQL statement for result set is much more cleaner and easy to
maintain comparing to data structure and reading data in a loop, parsing
data and, going back and forth to AS/400 to read more data.

Just wondering why you mentioned bidrectional. Sored Procedure are not
bidirectional?.  Actually they are much better you know what you are sending
and what you are receiving?

Error Trapping. There is no solution for poor programming. You already
mentioned it :-)  Just put a MONMSG CPF0000 in HLL just like you did in
java? Sorry I ment to say that you have to wait an see Data Que?  Which is
kinda error trapping for me.

Again I am trying to see a difference b/w Data Ques, MQSeries and Stored
Procedures.  Not HLL or SQL

Just want to mention, you are doing a great job out there. (Are you getting
paid for this :-) just kidding)

Thanks
Mohammad Tanveer


-----Original Message-----
From: Joe Pluta [mailto:joepluta@PlutaBrothers.com]
Sent: Thursday, August 30, 2001 2:21 PM
To: java400-l@midrange.com
Subject: RE: Communicating between java & rpg?


Simpler?  How?

        parms[0].setInputData(data);
        if (call.run() == false) {
                throw new Exception("Receive failed.");
        } else {
                data = parms[0].getOutputData();
        }

This is as simple as you can get, and it's bidirectional.  It passes data to
and from the program.  And evidently you misread the code, because it
doesn't pass 2200 parameters, it passes a single parameter of 2200 bytes.



No need for error trapping?  Are your stored procedures calling HLL programs
or executing SQL statements?  For the former, what do you do if your program
name is wrong, or your program ends in error?  For the latter, what happens
if the SQL statement fails?  How do you catch those conditions?  In my case
I could ignore the errors, but that's a pretty poor programming practice.

Performance?  Performance of native I/O is often much better than SQL,
especially when writing data - I recently posted the results of a test that
shows that updating data with an RPG program is five times faster than using
embedded SQL.  From what I understand, the JDBC driver is even slower.

If, on the other hand, you're calling an RPG program that does native I/O,
you have to parse the SQL statement and, for inquiries, build a result set
in your program.  I don't have to do that in mine.

No, native I/O is simpler, faster and more flexible than SQL.

Joe


> -----Original Message-----
> From: Tanveer, Mohammad
>
> Thanks,  I think stored procedures are much simpler than this.
> No need for
> error trapping and waiting for data (performance), debugging is much
> simpler, I am not sure why people want to pass 2200 parameters.  May be a
> old design concept. Anyways at least I know how to call an AS/400 program
> and pass parameters.  Thanks a lot.

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


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.