*NEW is a horrible idea for trigger (or recursive) programs...
*CALLER is the best practice for trigger programs

Why would you need a recursive trigger program?

And assuming you built it before we got linear main programs in ILE RPG,
which can be recursive.
Then a better solution would have been an ILE CL entry point using CALLPRC
to an ILE RPG subprocedure.

Charles

On Thu, Apr 16, 2026 at 6:03 PM Marco Facchinetti <
marco.facchinetti@xxxxxxxxx> wrote:

Agreed but with sbmjob you have both: init job + groups creation.

Untill now we used *New only for triggers programs (recursive).

Best regards
--
Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco


Il giorno gio 16 apr 2026 alle ore 23:30 Charles Wilt <
charles.wilt@xxxxxxxxx> ha scritto:

On Thu, Apr 16, 2026 at 2:34 PM Marco Facchinetti <
marco.facchinetti@xxxxxxxxx> wrote:

If PgmB was designed to run in batch and isn't a program of a few
hundred
lines, I wouldn't dare hope that everything will work just by
activating
LR
on exit. You should be sure it doesn't call other programs or use
service
programs.
If you can guarantee this, you could save yourself the cost of a new
job
with every invoice by modifying PgmB with ACTGRP(*NEW).


OP please don't. Calling a PGMB that uses ACTGRP(*NEW) in a loop is
going
to hurt.
Not quite as bad as submitting PGMB to batch, but still, never a good
idea.

If you've ever had IBM perform a performance analysis on your system, one
of the key things they report on is activation group creation and
destruction.
Why? Because it's resource intensive, requiring CPU and IO and also
drives
up DB full opens.

Charles
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.