|
Charles, I try to use look-ahead fields in a program. The primary file is an update
file....
When I debug my program, I see that the *INMR is set on but my look-ahead
fields have the same values that the current record of my secondary file. It is supposed to have the value of the next record.
The problem is the update file. Consider this statement in the RPG reference manual: "When a record is being processed from a combined file or an update file, the data in the lookahead field is the same as the data in the record being processed, not the data in the next record." I think this is because of the record lock being held, and it doesn't retrieve the next record until you have finished the cycle with the current record and updated or release the record. Lookahead has always worked this way -- I remember dealing with this back in the 70's when I first did matching records. What exactly is the goal you are trying to accomplish? Doug
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.