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




I have several ILE RPG programs that have common subprocedures in them and those subprocedures are contained in a copybook. The copybook is manually copied into the source with a /COPY and the prototypes for those subprocedures are in the D specs of the programs that use them. Some of those programs also use our standard copybook that has other user written functions that are in a service program. That service program is in the binding directory keyword that is coded in all of the ILE RPG programs with the common subprocedures.

I noticed this morning if I manually code a prototype in an ILE RPG program that is also in a copybook, the program will not compile as there are duplicate entries in for the same functions.

My question is:

If I add those functions that are in copybooks to a service program, and the service program is referenced in existing programs that may have the hard coded prototypes in them (and the /COPY statement), will the programs still work properly without recompiling?

In other words:

I have program A that uses function #1. In program A, function #1 is used via a /COPY and PR statements. Program A is also compiled with a service program, S.
I have program B that uses function #2. In program B, function #2 is used via a /COPY and PR statements. Program B is also compiled with a service program, S.

Programs A and B both have an H spec that references the binding directory that contains an entry for service program S.

Programs A and B are already in the production environment.

I then add functions #1 and #2 to service program S, but do not recompile programs A nor B. I also add the associated prototypes to a prototype copybook.

I have a third program C that uses both functions 1 and 2, without the copybooks and PR statements, since the PR statements are now in the prototype copybook and the code for the two functions is now in the service program (in development). Program C's H spec also references the binding directory that contains an entry for service program S.

When C is moved to production with the updated service program, will A and B still function or will they need to be recompiled? I know how to manage the signatures, but since A and B now have a copy of the functions internally, and those functions are now in the service program (that A and B also reference via the BNDDIR H spec keyword), will that cause any errors when programs A or B are executed without a recompile?

I hope this is not too confusing.

Thank you,

Doug


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.