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



There are three types of calls:

Dynamic Program Call - *PGM calls another *PGM, only option in OPM, can still use with ILE *PGMs

Static (or Bound) Procedure Call - ILE only, using either Bind by Reference or Bind by Copy.

Dynamic Procedure Call - ILE only, using procedure pointers.


We've been discussing the second type of call, static procedure calls, using bind by reference or bind
by copy. Examples of the two different types of binding:

Modules:
M1 with procedures M1P1, M1P2
M2 with procedures M2P1, M2P2
M3 with procedures M3P1, M3P2
M4 with procedures M4P1, M4P2
M5 with procedures M5P1, M5P2

CRTSRVPGM SRVPGMA MODULE(M3)
CRTSRVPGM SRVPGMB MODULE(M4 M5) BNDSRVPGM(SRVPGMA)
CRTPGM PGMA MODULE(M1 M2) BNDSRVPGM(SRVPGMB)
CRTPGM PGMB MODULE(M3 M4)

Bind by Copy calls include
Calls in PGMA from M1P1 to M2P1
Calls in PGMB from M3P1 to M4P2
Calls in SRVPGMB from M4P1 to M5P1

Bind by Reference calls include
Calls in PGMA from M1P1 to M4P1 (SRVPGMB)
Calls in SRVPGMA from M5P1 to M3P1 (SRVPGMA)

In other words, the procedures in the modules listed on the MODULE parameter of the CRTPGM or
CRTSRVPGM command are bound by copy. Procedures in service programs listed on the BNDSRVPGM parameter
are bound by reference.

The different between a dynamic program call, and a static procedure call using bind by reference is
that the binder creates a symbolic link during the PGM/SRVPGM creation for procedure bound by
reference. While the actual physical address of the *SRVPGM object is not resolved till runtime, the
symbolic links mean that there is basically no performance difference between calls using bind by
reference or bind by copy. Bound procedure calls are much, much, faster than dynamic program calls.

While you can't delete a service program your program uses while the program is running without
crashing your program, you can recreate the service program specifying REPLACE(*YES) which moves the
version of the service program in use by your program to the QRPLOBJ library. However, this isn't a
function of the bind by reference. Rather, it's a function of the single level store and the OS being
object based.


HTH,


Charles Wilt
--
Software Engineer
CINTAS Corporation - IT 92B
513.701.1307

wiltc@xxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of David FOXWELL
Sent: Wednesday, May 28, 2008 5:17 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: More SRVPGM basics



-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
De la part de Simon Coulter
The service program itself has a copy of the module. The program has a
reference to the module via the service program.

But the call isn't the same as from one OPM to another, isn't it.




-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
De la part de Takken, Cor
the binding is done at program start and will not be modified during the
running of the program (as true dynamic calls are bound, or rather
resolved, at every usage).

If the binding is done at program start, I should be able to delete the
service program and my program will continue to run, right?





I think what I really need is the dummies' guide to ILE!
--
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.