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




On 17/06/2008, at 8:05 AM, Mike wrote:

I need to bounce this off you guys to see if there is a better way. This is
bugging every aspect of me and am looking for ideas to simplify my life.

I have two sets of files. Out of the 5 files in the set of files, only one
file in the set is different. So now I have a maintenance nightmare of
having two programs exactly the same (and keep the same) except for the
files they use. Is there a way I can make this one program? I could use a
flag and put an if statement on every read/write/update/delete, but could
there be a better way? The other file is similar, but different enough that
I think it would be best just to maintain two programs.

So what you mean is:
o 2 sets of files
o 5 files in each set
o 4 of the files in one set are identical to files in the other set
(in layout but perhaps different in name)
o 1 file in each set is completely different in layout

You can use OVRDBF or the EXTFILE and EXTMBR keywords to dynamically alter which of the 4 *same* files are processed. If you cannot programmatically determine which set to process on each run then pass in a parameter indicating which set should be used. For the two files that are different: make them USROPN and create separate procedures to handle each file and use the same determining factor to decide which procedure to call.



Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




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.