If you are going to use RRN() within an SQL statement to identify the max(rrn()), you should consider an SQL index using RRN as your derived key.
create index lib.index on lib.your_table(rrn(your_table))
this will prevent a table-scan when determining last RRN read
Steve Needles
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of William Salim
Sent: Monday, January 06, 2014 9:36 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Get Record Creation Date
Hi Guys, just at home already from work. And the result is i cannot do the trigger process, this is not allowed.
So I use the RRN process but adding more steps.
Every records that the app read will log to the work file the flag for :
1. Last RRN that read
2. months+day KEY
3. Logged 1 row last record to work file
the process is when its normal will use the RRN, IF RRN not found or being reorganized then
chain to months+days and trace
if found()
do until found or eof
check the records compare to DS that record in work file
if found()
log to work file
leave
endif
if not found() and eof()
*someone delete the record (Manual auditing)*
endif
enddo
endif
ELSE
select where rrn(file) >= last RRN from work file ENDIF
I use SQLRPGLE process, SELECT to get the RRN and Logical file contain
month+day.
Not sure it is, but as long as it is run, i will keep my eyes closed at hopefully wake up at another place :)
Good night guys
On Mon, Jan 6, 2014 at 9:53 PM, D*B <dieter.bender@xxxxxxxxxxxx> wrote:
@Charles: thanks for assistence. We use this technique at many
customers in SQL only environments, so I didn't have an example for
the DDS/RLA versions.
@Buck: first time I succeeded to convince management for using
journaling of all tables is > 20 years ago. We've had had a CISC D60
and there was nearly no measurable impact. If you have slow disks,
creating an ASP of its own for the receivers will compensate this.
Disk space requirements could be minimized by an appropriate reorg process.
Your recommendation to have a 1 h limited try with measurments is a
good one.
D*B
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.
--
Regards,
William Salim
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
________________________________
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.
TRVDiscDefault::1201
As an Amazon Associate we earn from qualifying purchases.