|
> IMHO, to mirror an ordered subfile key into an ordered array just adds > another layer of programmed synchronization and a potential for > failure. The value is already in the subfile (in order), why take up > more resource to replicate? > > Let's see, 9,999 potential elements per subfile times value > length times > number of users or managing dynamic user space when about 50 lines of > code can do the job? I don't think so. > I think there are some situations where shadowing a subfile in arrays or data structures is a good idea. You can support rudimentary undo that way. If you use RPGIV array overlays or more complex techniques in RPG Classic, you can allow users to sort the subfile in a disgusting variety of ways. There's the situation where you want to move forward and backward in time where the subfile holds one screen time period's worth of data. Personally, I don't find it that hard to code. Once you write the indexing routines you don't have to think about it too much. If you design the program carefully, it's unlikely that anyone doing maintenance will ever have to pay attention to the lower level indexing stuff. Remember, this is only my opinion and should no way be construed to be good programming practice or the product of a healthy mind. My real question is: OK, you've got a lot of records in your subfile, enough to warrent a binary search (a cool idea, I hadn't thought of doing it in a subfile). Is there a significant performance difference between doing this in an array and a subfile? +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@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.