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



Determining what procedure is actually run is a function of the compile/bind steps. So the programs that get a procedure from a copybook won't be affected at run time if the service program now contains a function of the same name.

Even though execution won't be affected you will want to eventually get those programs referencing the service program procedures. Otherwise, down the road someone will change a procedure in the service program expecting those original programs to see the change but they won't.

Scott

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Englander, Douglas
Sent: Friday, June 13, 2014 8:28 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: ILE RPG question: function consolidation


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

--
This is the RPG programming on the IBM i (AS/400 and 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.



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.