|
On 10/03/06, James H H Lampert <jamesl@xxxxxxxxxxx> wrote: > We did determine that writing a duplicate key to a file > (and allowing it to fail) was a real killer on speed. Is > there a "cheap" way to check for a duplicate key without > writing, and that works when you're trying to read the > file sequentially even as you're adding to it? I would define a second instance of the file in the program, accessed by key, and check for the record, and possibly add it, in that. If in RPG the conventional wisdom is that it's more efficient to setll than to chain in this other file. If, however, you expect the record to be found infrequently, as seems the case here, I think you'll find that chain is more efficient. I suppose also if anyone wants to debate that specific point the conversation should move over to rpg400-l. -- Dave...
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.