|
On Tue, 10 Jul 2001 SCarter@rsrcorp.com wrote: > example 1: > > Payroll system we have a program that creates a list for payroll personnel > of who is going to be paid, how much and so on. > The actual program uses the axact same code to actually write checks but in > a different source... Obviously the problem > here is that when some thing changes we have to change 2 seperate source > file and recompile blah,blah,blah. > This seem perfect for using subprocedures/service programs in a rewrite.. I would agree with you. This sounds like the perfect use. > example 2: > we want to standardize interfaces across the system. is it worth it to > create service programs to handle the screen interface > or is this just an extra level of complexity that would get in the way? It probably depends on each application. Here is an example of what we have done: Many of our applications require the user to be authorized to use them. Each user can have a different level of access to the various applications. We created a service program that allows us to avoid code duplication in our programs provides a consistent interface to prompt the user for a password. Now none of our programs need to be aware of a screen to do prompting nor do they need to be aware of the file containing the authorization levels. Instead each app can just use: C eval err = getappauth(parms) err tells us whether or not the authorization succeeded. getappauth() contains a prompt screen to enter a password (or it can be told not to prompt by passing a parm). So every application uses getappauth() and automatically gets to use a prompt window (consistent interface) and doesn't need to know the specifics of how the authorization is done (code reuse). James Rich james@eaerich.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.