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




On 12/03/2008, at 7:32 PM, David FOXWELL wrote:

After much reading I think the benefits of using service program is beginning to sink in although without practical experience I admit having some difficulty. Currently, we only use modules bound by copy into many different programs and we need to explore the possiblities of converting to the use of service programs.

I thought I read somewhere that service programs do not run in the *DFTACTGRP, but I can't seem to find that information again. Could someone confirm if this is true or not?

It is both. You cannot compile a program that uses external procedures and have DFTACTGRP(*YES). The compiler complains. However, you can create a program with ACTGRP(*CALLER) and invoke that from a program running in the default activation group. This will cause the second program (and possibly any programs and service programs it calls) to run in the default activation group.

Prompting the CRTSRVPGM command and examining the ACTGRP keyword would show you that the only values are *CALLER or a name of your choice. Compare this with the ACTGRP keyword on the CRTBNDRPG command. You will notice that CRTBNDRPG also supports DFTACTGRP which is absent from CRTSRVPGM. Thus your question has been partially answered. However, The default, and usual, setting for a service program is to run in its caller's activation group. If such a service program is invoked from a program running in the *DFTACTGRP then the service program will also run in the default activation group. This is a bad state of affairs. Avoid it by either specifying a named activation group on your service programs, or create your main programs with a named or *NEW activation group and allow all service programs to use *CALLER. I use both methods according to my needs.


What kind of problems could we expect to run into when mixing ILE and OPM?

You cannot call service programs from OPM so either you mean ILE running in *DFTACTGRP, or you will have to create wrapper program objects to be invoked from OPM, or you will have to convert your OPM programs to ILE.

You cannot unload service programs from the default activation group except by ending the job (e.g., signing off). This makes development and testing awkward.

ILE and OPM (and ILE running in *DFTACTGRP) have different scoping for overrides, opens, and commitment control. ILE gives you more granular control over these things which is a good thing but can take some getting used to.

As I recall the ILE concepts manual gives some information about a mixed environment. It's been ages since I read that manual so I cannot be sure but it is a good read and explains ILE in great and understandable detail.

Also, search the archives. You are not the first to ask these questions in the 15 years or so that ILE has been available.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




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.