|
I think that is where the Data Mediator that appeared a few months ago in Midrange Magazine comes into play. You call one program and it knows how to map the data from any I/O service program back to you. You would still have to write one service program per table to do the I/O but you would only have one service program to include in your program. Brilliant piece of work that guy did with that Data Mediator. -----Original Message----- From: watern@CBS.FISERV.COM [mailto:watern@CBS.FISERV.COM] Sent: Monday, October 04, 1999 1:41 AM To: RPG400-L@midrange.com Subject: RE: Re[4]: LVLCHK *NO Alan wrote > ..<snip>.. The service program would just have a set of functions like, OpenFile, Position File, ReadRecord, ReadNextRecord, etc....<snip>... I like this idea of service programs for accessing files. I have seen it done once before, with one service program per file. You told the program what view you wanted, what operation (setll, reade etc) and a structure to return the data in. It was restricted to the six main master files. It did make the programming more cumbersome, but I can see the benefits of it. I believe Lansa actually does something like this for database access, but have no direct experience of the product myself. ..<snip>.. One of the first things I always hear when I discuss this method is that you are creating a whole bunch of new indexes which is not correct. As long as the AS/400 has an existing index, no matter how many times you create another logical view of the data base, the AS/400 will maintain one index only unless you specially override it and tell it to create a separate index. ..<snip>.. I have come across this before. I am sure I heard that when recompiling logical files, careful consideration of the order in which they are compiled can make good use of this feature. If File1 has key {order number, order type} and File 2 has key {order number, order type, order date} then by compiling File 2 first, File 1 will have an existing acess path it can use. I hope I didnt misunderstand this. I believe there is also a way of determining how access paths are shared from one of the system commands... does anyone know what this is ? Nigel. $ConflictAction: 1 +--- | 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 +--- +--- | 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-2025 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.