Thanks Craig.

So getting back to stored procedures,

If the external program is *caller it would run in the DAG.

If the external program is *new then each time a stored procedure runs a new activation group is created.

If the external program is named then only the first time the stored procedure runs is the named activation group created.  The named activation group will persist until either a RCLACTGRP is issued or the web server job servicing the stored procedure ends.

Does this all sounds correct?

So if my above understanding is correct then I think rather than specifying *new for the activation group on the external programs of the stored procedures, specify a named activation group SPACTGRP would be better.  Then the first time the web server job services a stored procedure the activation group SPACTGRP is created.  For the life of that web server job (as long as a RCLACTGRP is not issued)  all subsequent stored procedures will use the existing SPACTGRP activation group.

If this is correct then I want to thank everyone for helping solidify my understanding.

Rob


On 2/20/2018 3:33 PM, Craig Richards wrote:
Yes Rob that’s correct

On Tue, 20 Feb 2018 at 18:39, Robert Rogerson <rogersonra@xxxxxxxxx> wrote:

Thanks Mark. I agree, I'm not 100% sure.

So when you say "the named activation group stays out there until the
job ends." the job you are referring to is the server job and not the
external program from the stored procedure?

Let me try to explain my thinking (which may be flowed)

If a program is called from a menu, the menu runs in the DAG. But the
programs runs in the activation group of the compiled program.

If this is *caller then it would run in the DAG.

If this is *new then a new activation group; is created and is destroyed
when the program ends.

If this is named (which until now our shop has never used so my
understanding is limited) the system checks if the named activation
group exists (in this job/session) and if not the named activation group
is created. Here is where I'm not sure. So if RCLACTGRP is not
specified, then the named activation group exists until the user signs
off ending the session and therefore the job.

Is this correct?

Thanks,

Rob



On 2/20/2018 12:08 PM, Mark Murphy wrote:
On Sun, Feb 18, 2018 at 6:38 PM, Robert Rogerson <rogersonra@xxxxxxxxx>
wrote:

So if *new or a named activation group is specified for the external
program, each time it processes a stored procedure it will create and
destroy the activation group. So my understanding would be that if all
programs called by the external program specified *caller and the
external
program didn't call itself then there wouldn't be any difference (under
the
previous circumstances) between *new and named activation groups. In
both
cases when the external program starts an activation group is created
and
when the external program ends the activation group is destroyed.

So our existing strategy of the initial program using *new should be
acceptable.


I think you are confused on the named activation group. Only a *NEW
activation group is automatically destroyed when a program ends. The
named
activation group stays active on program end, and is only created when
necessary. You can manually end a named activation group with RCLACTGRP.
Otherwise, the named activation group stays out there until the job ends.
--
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: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


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.