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



Its not an RPG thing necessarily. SQL update will do this too. I suspect
its done at the journal level. If you run an update against a file,
something like:
update USRLST set USR=USR

The above statement will generate now journal entries even though SQL will
report that it updated records.

There is a journal setting where you can journal open and close operations,
if you want that kind of data.






From: Charles Wilt <charles.wilt@xxxxxxxxx>
To: "RPG programming on the AS400 / iSeries"
<rpg400-l@xxxxxxxxxxxx>
Date: 03/05/2015 11:06 AM
Subject: Journal not showing update - DB won't update if nothing has
changed?
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



All,

Been looking into a issue and thought I had a handle on it.

Till I realized for certain records, I don't see an update entry in the
journal as I expected.

Back to the code...after spending a an hour or so looking. I really can't
see how the UPDATE wouldn't have have been hit.

Then it hits me, for a few records, none of the values in the fields of the
file would have actually changed between READ and UPDATE.

IIRC, RPG by design won't actually do an update unless the buffer's
changed.

In other words:
read myfile;
wFld1 = fFld1;
wFld2 = fFld2;
fFld1 = wFld1;
fFld2 = wFld2;
update myfileR;

Wound't actually update the record in myfile.

Can anyone confirm that I'm not misremembering?

Thanks!
Charles
--
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.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.