|
Robert
I believe that there are C functions for writing to an RRN - not in RPG - no guarantee, though, but if there is, you could write an SQL UDTF to do this, maybe.
But this architecture - wow! Does the app also initialize a certain number of records? Not sure I'm saying anything that is helpful, of course!
Vern
On 5/28/2020 4:46 PM, Robert Wenzel wrote:
I have DDS Physical files that are multi-member files and are
declared REUSEDLT(*YES). Is there a keyword or phrase that will force the
next insert to the next RRN without reusing an empty/deleted record?
Why I ask ; I need to have an SQL Insert statement to insert the next
record to the end of the file (not a reused RRN). The files do not have
unique keys. I cannot modify them. I have an application that will allow
a user to delete and then, potentially, recover the deleted records. I
catalogue the RRN of the deleted record in an audit file with the original
RRN (from the original member) and the new RRN (of the recovery member).
After recovery I catalogue the RRN of the record that was inserted into the
original member from the recovery member. The problem occurs if the
user deletes, for example, RRN #1 then deletes RRN #2 and then recovers RRN
#2. DB2 places the "new" (recovered) record in the RRN #1 location of the
PF. My catalogue now has duplicate RRNs of records that were deleted from
RRN position 1. This should not be the case.
I know I can change the attributes of the PF, even temporarily, but many
batch jobs use these files throughout the day. I would prefer an SQL
statement directive.
Thank you all.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.