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



Mark S. Waterbury wrote:
#1. if a *MODULE is used by (bound into) only one *PGM, then just go
ahead and directly bind it into that program with the CRTPGM command

#2. as soon as any *MODULE is to be used in more than one *PGM, then it
is time to put that module into a *SRVPGM.

Personally, I would recommend putting the module directly in a service program and not binding it directly into a program ... especially if there's a chance that the routine would be used in any other programs in the future.

Binding modules directly into program establishes (what I consider) a bad habit that should be avoided.

Plus, when you decide to move a module that's bound directly into a program into a service program, you have extra work (modify the original program & create the service program).

There are only two situations where I would consider binding a module directly into a program ...

1. Security concerns ... avoiding the risk that some kind of security program might get overridden by someone by putting the service program it's bound into higher on the library list.

2. Necessary mixed languages ... where I need to call a C, CL, or Cobol routine in a program that would never be used anywhere else.

FWIW: I also think that there's no real reason to create multi-module programs where all the modules are the same language. If you have procedure that's private to a program (and would never be used in another program), there's no need to put it in a separate module ... just put the procedure in the main program. Less to manage that way.

david



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.