<SNIP>
I have the same question. I think the partial answer is that the read
prior instructions don't have an SQL equivalent.
</SNIP>

Steve,

There is always the FETCH PRIOR clause in the SELECT statement.

Regards,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries



On Thu, Oct 22, 2009 at 6:07 AM, Steve Richter <stephenrichter@xxxxxxxxx> wrote:
On Wed, Oct 21, 2009 at 9:31 PM, Vern Hamberg <vhamberg@xxxxxxxxxxx> wrote:

I don't understand what you mean when you say that RPG's I/O model
doesn't map to RDBMS's. Seems to me there is little difference
functionally between cursor-based processing - a FETCH into a host
structure - and a CHAIN into a data structure (recent versions).

I have the same question.  I think the partial answer is that the read
prior instructions don't have an SQL equivalent. Also, holding a
record lock. On the record lock front I would create a 2nd file that
held the keys of every row of a corresponding table that currently has
a read lock. Any SQL UPDATE instruction used on a table that could
currently have a record lock on it would have to include a WHERE NOT
EXISTS clause that selected records for update only if the keys to the
row were not found in the "currently locked row" table.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].