Hi Pascal -

An interactive program named "Bill" runs on a server.   "Bill" updates
records to file "table1" and adds records to file "table2".
"Bill" has started last night and won't stop until I tell him to do so.  If
I try to lookup for changes since "Bill" has started I can't see them with
SQL.  If I stop "Bill" then I can see the records added and the ones
updated.

You should always be able to see the updated records.


As has already been pointed out, not being able to see records that have been added to a file is most likely the result of record blocking within the program. The RPG compilers default to using record blocking for files that are output only, and also for files that are input only if you don't use certain kinds of operations. When the file is opened, data management may change override the blocking request for output files if there are unique keys involved or for other reasons.

If you are using RPG IV, you can put BLOCK(*NO) on the F-spec for the file that records are being added to, which will cause each record to appear in the file as soon as it is written. If you are not using RPG IV, you can use a file override (OVRDBF) with SEQONLY(*NO) to accomplish the same thing.

Ken
http://www.ke9nr.net/
Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.