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



Not an answer to your question but don't forget when it comes round to "fixing" this if it is a buffering issue that you have FEOD(N) as an option which will impact performance far less than a straight FEOD or Block(*No).



On Nov 21, 2019, at 1:00 PM, Craig Richards <craig@xxxxxxxxxxxxxxxx> wrote:

Hi All,

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 that
if an RPGLE program is buffering output, there won't be journal entries for
writes to that file until the data is actually written to disk.
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 Server
Process

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 but
there is no point in doing that if the journal sequence numbers are already
telling me that the records from the Order Line got there before the Order
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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.