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



sjl wrote:
In another thread I inquired about using DRDA to retrieve data
from remote systems: http://archive.midrange.com/midrange-l/201002/msg00209.html

To that end, I am now working on a proof-of-concept program for
pulling data from several remote systems using DRDA (using SQL to
'Connect To' the remote databases and retrieve the data).

My RPGIV program is using dynamic (prepared) SQL statements to
build a cursor over the table(s) on the remote database(s). I
received the SQL0805 (SQL package XXXXX in XXXXX not found at
DRDA server) message while testing the program.

Do I have to create an SQL Package on each remote system? How do
I make this work, other than switching back to static SQL?


FWiW:

There is the option of performing the dynamic SELECT queries using a *QMQRY object [or perhaps two, if the DBCS issue requires that] to STRQMQRY QMQRY() RNB(named) OUTPUT(*OUTFILE) OUTFILE(thefile) OUTMBR(*FIRST *ADD) for each RDB; probably preceding the requests with "CLRPFM thefile *first" if any specific data collection does not enable its being selected. No SQL packages required for that. The CONNECT is performed by the QMQRY processor from the parameters on the STRQMQRY command, and the OUTFILE() is just as any other; i.e. OUTFILE() support is local, so the FETCH is done from the remote query, and the INSERT is local [albeit not necessarily implemented exactly as such, the effect is such].

There is also the option to use SQL CALL to invoke a stored procedure on the remote systems, where that procedure generates a result set. Instead of creating a package, the procedure could be created instead. However that create should be able to be done at run-time unlike the SQL PACKAGE [object type *SQLPKG] which must be created in advance at each remote system.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.