|
In answer to your question, yes RPG's buffering is prior to the record
being passed to the Db and thus prior to journal entries being created...
Also note that RPG won't buffer records output to a file with unique keys
(as the Db has to have them to enforce the uniqueness)
Is commitment control being used by chance?
Charles
On Thu, Nov 21, 2019 at 11:00 AM Craig Richards <craig@xxxxxxxxxxxxxxxx>
wrote:
Hi All,that
I'm trying to track down an infrequent but troublesome bug.
My best guess at the moment is that it is caused by an RPG program
buffering output so that not all records have hit the disk when an
asynchronous process wants to read them and run some SQL joins.
However, looking at the journal receivers, according to the sequence
numbers - the records are being written in the correct order.
Apologies in advance if this is a stupid question but my assumption is
if an RPGLE program is buffering output, there won't be journal entriesfor
writes to that file until the data is actually written to disk.Server
But I'm not certain of this...
Maybe an example would be clearer:
Program A - Batch Server Process (stays resident)
Writes Order Line.
Writes Order Header.
Sends Data Queue Entry to wake up Program B running in another Batch
Processbut
Program B - another Batch Server Process (stays resident)
Requires the Order Header and the Order Line records in order for the SQL
join to select some rows.
Looking in the journals, I can see, in sequence number order:
Program A Write to Order Line
Program A Write to Order Header.
Is this journal sequence conclusive proof that the Order Line was present
on disk before the Order Header was?
If Program A was buffering output, such that the Order Line records,
written chronologically first, sat in Program A's buffer until some time
after the Order Header records hit the disk - would the journal sequence
numbers indicate that?
Obviously I can use FEOD or Block(*No) in Program A for file Order Line
there is no point in doing that if the journal sequence numbers arealready
telling me that the records from the Order Line got there before theOrder
Header.--
thanks kindly,
Craig Richards
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
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.