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



Thank you everyone.  This information is very helpful.  I am thinking of
using service program to gain the ability to make changes without having
to recompile.

It's very difficult (if not impossible) to make it possible to make changes without a recompile. What if you make a field bigger that's used in a subfile? or on a report? or on a screen? or is moved to work variables?

To do it right, you'd have to go back and change these reports, screens, work variables, etc. You'd have to shift other fields around to make space for the expanded field size.

How are you going to do all of this without a recompile?

It's true that you might be able to avoid recompiles when adding a brand new field, however.


But Paul's warning about potential file sharing conflicts concerns me. Is there a way to avoid these conflicts and still use service program?

Sure, you just have to have a separate copy of the service program for each program that needs to be active at the same time. Or, you'll have to write your programs so that they don't rely on the file pointer to be in a particular position.

I know we are going to run into a problem where I have two programs reading the same file and in the same application.

A sure-fire way to solve this would be to access the files through the Ropen(), Rlocate(), Rreadk, Rupdate(), etc APIs so that you can have multiple instances of them open at once.

Though, frankly, I think you're creating a nightmare for yourself by doing things this way. Don't "echo' the RPG CHAIN, READ, WRITE, etc opcodes, it gains you very little! Instead, write a "Business Model" service program, and keep with the MVC design.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.