× 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 wish David would chime in again here because you are correct if that is how the SrvPgm was invoked.

The honourable Mr. Gibbs however posted "When the service program calls the external RPG program, should the activation group change from QILE to a new activation group?" which I took to mean that he had looked at the job and knew it was running in QILE.

I don't know - these folks who post questions and then disappear ... <grin>


On 2013-07-25, at 10:07 AM, Dan Kimmel <dkimmel@xxxxxxxxxxxxxxx> wrote:

Here's how I follow it. Others please correct.

JT400 Class ServiceProgramCall invokes class RemoteCommandImplRemote to load and run the service program procedure. The service program name, procedure name and parameters are all loaded up into a parameter structure and QSYS/QZRUCLSP is invoked by sending a RCProgramCallRequestDataStream using the server.sendAndReceive() method. QZRUCLSP dynamically loads the service program and runs the command, returning the result (result must be an integer or void) and all the messages.

See: http://jt400.cvs.sourceforge.net/viewvc/jt400/src/com/ibm/as400/access/RemoteCommandImplRemote.java?view=markup

QZRUCLSP runs in the default activation group. So the first invocation of the service program procedure coded as *CALLER is going to have its dynamic storage allocated in the default activation group. That program calls bound RPG program coded for AG *NEW. A new activation group will be created in the job at the time of the first call, say that's AG 35. When that *PGM object invokes the service program again, I believe there will be a new dynamic storage area allocated in AG 35, mostly because the original invocation was within *DFTACTGRP.

If the original invocation of the service program was in any activation group other than *DFTACTGRP, I think the dynamic storage area allocated in that activation group would be reused.

So I think your question is about the dynamic storage area, rather than a "copy of the service program". And I think the answer is that a new dynamic storage area is going to be created in the non-default activation group simply because the original invocation was within *DFTACTGRP due to JT400 loading the service program by calling QSYS/QZRUCLSP which is built as *DFTACTGRP.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
bounces@xxxxxxxxxxxx] On Behalf Of David Gibbs
Sent: Wednesday, July 24, 2013 3:09 PM
To: Midrange Systems Technical Discussion
Subject: Activation group quandaries

Folks:

I need some clarification about service program & program behaviors with
regard to activation groups.

I've got a service program that makes a call to an external ILE bound RPG
program (prototyped, with EXTPGM). The RPG program is compiled with
activation group *NEW. The service program is compiled with activation
group *CALLER.

The service program is invoked from java via a remote program call (JT400).

This RPG program makes a procedure call into the same service program that
calls it.

My questions are:

When the service program calls the external RPG program, should the
activation group change from QILE to a new activation group?

When the external program calls back into the service program, will a new
copy of the service program be loaded ... or will it call back into the original
service program that invoked the external program?

Thanks!

david


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com





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.