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



You really shouldn't have been binding M1 into each program that needs to use it.

Instead, M1 should have been in a service program, called for example MYSRVPGM.

MYSRVPGM could have been in an application specific or company wide binding directory that most if not
all programs made use of. Only *SRVPGM objects are listed in this binding directory.

When you created M2, it could have gone into MYSRVPGM or perhaps some other or a new service program.
You might at some point decide to create a binding directory to make it easier to recreate MYSRVPGM,
on the *MODULE objects to be included in MYSRVPGM should be listed in the binding directory. Note
that using the UPDSRVPGM command is easier than recreating the service program when one of its modules
change.

This way, when you change M1 or M2, none of the programs using the procedures in either need to be
recompiled.

The golden rule, if you have code you intend to share, the code belongs in a service program.

At this point you have two choices:
1) Create your service program(s) and use it only for your program right now.
2) Create your service program(s) and change all programs containing M1 to use the service program(s).

Option one is less work up front. If it were me, I'd rename M1 to M1A. That way if you changed any
current programs containing M1 they wouldn't be able to find M1 and you'd be force to update the
programs to use the service program(s).

Lastly, before starting to use service programs, make sure you understand and use BINDER SOURCE.
Binder source is the key to allowing modules to be changed in a service program without recompiling
the programs that use the service program. There should be plenty of information online and in the
archives about BINDER SOURCE, and you can of course ask questions here.

HTH,

Charles Wilt


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Monday, November 12, 2007 8:18 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: Binding directory trouble

Hi

I just added a simple CALLP to a module M1. The procedure
called is in module M2 so I added the module M2 to my
program's binding directory.
No problem.

Now, what about all the other programmes that bind in M1.
They need M2 as well in their BNDDIR. But M2 calls other
procedures from other modules that call other procedures
from other modules that call .....

Just my luck, M1 is used just about everywhere and the boss
can't understand why suddenly he can't compile his own
program anymore!

Even worse we have a rule that makes us recompile every
program that uses a module when that module is modified. I
called our utility program with M1 as its input parameter. It
looks like it wants to compile every program in the shop.

What do I do folks?

--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




This e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated.


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.