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



Hi,

It's a long story of generated RPG code on S/38 that could return the RRN
then being emulated by generated C & SQL (including emulating an RRN!) on
OS/2 then Windows, then being ported back to iSeries and using "real" RRNs,
then for performance reasons, where possible being re-coded using the _Rxxxx
native I/O APIs.

Unfortunately we now support I/O to files that cannot be accessed via native
I/O (containing CLOBs & BLOBs etc), so that we are left needing to find out
what the RRN of the just INSERTed record is.

The short answer is no, we need the RRN.

Regards,

Kevin Wright



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Dennis Lovelady
Sent: Thursday, 25 February 2010 2:08 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: After an SQLCLI INSERT, is there a way of getting the
relative record number of the record inserted?


When an RPG WRITE or a C _RWrite is performed, the relative record
number of
the record just inserted is available in file i/o feedback areas
accessible
to the RPG and C programmer. When an SQLCLI INSERT is performed we are
not
aware of a way to retrieve the relative record number of the record
just
inserted, except by reading (SELECTing and SQLFetching) it immediately.
Need
I say that this doesn't perform very well?

Since SQL doesn't really have a concept of record number, I doubt that
you're going to find a better-performing answer. But if I may be so bold,
why do you need this? Can the RR# be replaced by a sequence and work as
well for your needs?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"No man has a good enough memory to make a successful liar."
-- Abraham Lincoln




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.