MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2013

RE: Activation group quandaries



fixed

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







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact