× 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.



Hi, Mike:

OS/400 or IBM i provides many viable alternatives to using database tables (files) -- for example, perhaps you could use a never-ending server job, and your applications would make requests and receive results via data queues... Also, you might want to consider using a combination of user spaces and user indexes to store the data in a way that might be far better than database files, from a searching speed perspective. (You could use one or more database files or members to house the data, to make it easier to initially load and maintain the data, then read it into the user space and/or user index when the "server job" starts.)

Perhaps you could give us some kind of "example" of the type(s) of key(s) to be used and the kind(s) of data to be returned, even if it is entirely fictional, contrived or hypothetical, just to give us all a better idea of what you may be trying to do?

Also, can you give us some idea of the record layout of these files? Are they all the same, but only the data content is different? Also, how many records do you anticipate would be contained in each of those individual files? (If they all have the same record format and layout, perhaps you could use multiple members instead of many files?)

The more detail you can provide, the better the answers or suggestions we may be able to supply.

All the best,

Mark S. Waterbury

> On 1/24/2013 2:24 PM, Michael Naughton wrote:
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 ...

Replies:

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.