|
<snip> I was thinking of creating two modules for each file in the database : the first one would contain procedures to update, add or delete records in the file, the second would contain procedures to get information from the specified file (input only). Finally, I thought of binding these two modules in a service program. So, I would have one service program for all I/O's per file. </snip> Two thoughts on this. 1. I am of the mind that things have moved past this point on the AS/400. Specifically, I would be looking at using SQL rather than continuing to use Record I/O. I know there have been a lot of back and forth on using SQL vs Record I/O but I remain committed that SQL is where we should be going. SQL just provides too many advantages. You are redoing the I/O anyway. I thought about externalizing the SQL but in the end that didn't make sense. Instead of externalizing the record I/O, look to using SQL. If you can get to V5R4, the last really big impediment is eliminated, having to use Fixed Format code for SQL. You might want to think more about externalizing business logic in service programs and separating the view from the model. 2. If you feel you have to stay with Record I/O, David Morris of Plum Tree wrote a Data Mediator several years ago that is still the most elegant solution to this problem. There is one mediator to make all calls to and it calls the appropriate service program. I had worked on doing the same thing for several years and figured out a better way to do it but in the end, I went to SQL.
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.