|
Patrick Conner wrote: >This is a very nice example of how to organize activation >groups (AGs), but what is the real benefit? When I first >started ILE about eight months ago I never saw any real >advantage to them. In OPM the only time I ever used an >open data path (ODP) is when I did an OpnQryF just >before calling a program and then deleted it before moving >on to the next program. I guess when you say "ODP" you mean Shared Open Data Path. The key here is Shared. The primary benefit is performance. If you call an RPG program it does a bunch of work before it executes your first C spec. Initialise variables, set up file buffers, open files, etc. If your application is broken into a main program and several sub-programs, you can see a large performance benefit by using shared file opens and not setting LR on in the sub-program. ovrdbf share(*yes) MAIN prepare all file buffers init vars open all files CALL SUB re-use file buffers init vars re-use open file do some work return (no LR) do some work in MAIN CALL SUB (again) re-use file buffers re-use variables re-use open files return >AGs seem to add a lot of complexities to RPG programming. >I believe it is the primary block to getting programmers to >convert to ILE. I don't just mean RPG IV, but real ILE. >The ILE concept book makes a big deal out of ODPs, >but like I stated earlier. I hardly use them. I like to use the word "flexibility" instead of "complexity" - it somehow seems more positive! Yes, AGs are one more thing to think about when designing an application, but I truly believe that this is a Good Thing. Far too many midrange programmers fail to think of the application as a whole - they think only of "this one program" and not how it interacts with all the others in the system. This is a simple approach, but it makes fragile applications because of subtle interactions that are by-products of writing each individual program. As for "I hardly use shared file opens" you aren't alone. There aren't that many midrange applications that take advantage of the technique even though it has been available to us since the S/38 days. I believe that one reason for this paucity is the simple fact that few programmers hear about it. Discussing it here will "light a candle" in somebody and spread the idea to at least one new person. That's progress! Buck Calabro Aptis; Albany, NY "Nothing is so firmly believed as that which we least know" -- Michel Montaigne Visit the Midrange archives at http://www.midrange.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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.