I'm posting to both midrange and RPG because I'm not sure just where this falls. I'm starting to build an application in which PgmA will call PgmB, passing it a key value and expecting back a character field. PgmB will use the key value to look in
File0000 to determine which of dozens of routines (RtnC01 through RtnC99) it should call. It will then call the right routine, passing it the key value and getting back a string, which it will then pass back to PgmA. The routines will each use values in
a unque data file (Fil01 through Fil99) to build the string. The data files will all have the same key structure, but other than that they could be completely different.
I'm trying to decide what the best architecture for this is -- is there a clear answer, or does it just come down to weighing the trade-offs between the existing choices? I figure I could make Rtn01 through Rtn99 procedures in PgmB, but it seems that
might make PgmB kind of big and unwieldy. For one thing, I'd have to define Fil01 through Fil09 in the F-specs, and isn't there a limit on the number of files you can define in a program? Also, in the real world, each routine will have several different
parts, some of which might get kind of complicated (they're actually doing more than just passing back a string).
All that makes me think that maybe Rtn01 through Rtn99 should each be in a separate source member. But then what should I do? Compile them all into a service program? Bind them all to PgmB using binder source? Either way, I'd have to put put prototype
definitions for all of them in PgmB, right? (We don't use /COPY members here -- maybe now is the time to start?)
Another consideration is that every time PgmB is invoked, it will only call one routine, so not having to load all of them every time might give me some performance benefits.
I'd appreciate your thoughts on the pluses and minuses of these or any other approaches .....
Thanks very much,
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
Internal: x 444
NOTICE: This e-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that any use is
strictly prohibited. If you have received this e-mail in error, please notify us immediately by replying to it and then delete it from your computer.
This mailing list archive is Copyright 1997-2013 by MIDRANGE dot 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 here. If you have questions about this, please contact