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



Buck -
A cursor defines a record set, correct?

I'm not using SQL CLI.

To simply, this is what my RPG program does this:

1) Uses 'connect to' to connect to remote database
2) Dynamically prepares an SQL statement to select records from the remote
table
3) Uses the dynamic SQL to open a cursor over the remote table
4) Uses Fetch to fetch a rows from the cursor into a externally-defined data
structure
5) Uses the fields from this data structure to populate a data structure
defined over a local file
6) WRITES a record to the local file.
7) Loops (steps 4-6) until all rows from the cursor are processed
8) Disconnects from the remote database

- sjl



"Buck" <kc2hiz@xxxxxxxxx> wrote in message
news:mailman.8043.1265905104.2580.rpg400-l@xxxxxxxxxxxxxxx
Over on the MIDRANGE-L list it was noted that RPG can consume a result
set without resorting to SQL CLI.

The scenario is: a central system fires off stored procedures on
multiple remote systems (most not IBM i) and consumes the result sets in
order to aggregate the many systems into one unified database.

I don't know how to consume those result sets in RPG. Does anyone have
a manual page I can read to educate myself?
--buck



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.