× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



RPG/400 has a limit of 50 files in a program. RPGIV has no such limit - except it is limited to a max of 8 printer files.

http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/c0925086843.htm

- sjl

"Michael Naughton" wrote in message news:mailman.11640.1359055610.10847.midrange-l@xxxxxxxxxxxx...

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,

Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
413-676-3144
Internal: x 444
mnaughton@xxxxxxxxxxxx
****************************************
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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.