×
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.
Hello,
With a batch job, the program is in memory and is released when the job
ends.
With an interactive job, it is in memory until the program ends.
That's not true. Interactive and batch work the same. But, perhaps you
use a different paradigm when you write your batch jobs from your
interactive jobs?
OPM programs, or OPM-compatible ILE programs will be unloaded from
memory when the program ends (or in RPG, when they end with *INLR=ON)
ILE programs (not in OPM-compatible mode) will be unloaded from memory
when the activation group ends. (Activation groups are sub-sections of
a job -- so when the job ends, the activation group also ends.)
ILE programs that are compiled with DFTACTGRP(*YES) will be in
OPM-compatibility mode, and will behave like an OPM program.
ILE programs that are compiled with DFTACTGRP(*NO) will act like real
ILE programs. (Even if they run in the default activation group via
ACTGRP(*CALLER))
Frustratingly, the DFTACTGRP parameter is mis-named. Sure, when you set
DFTACTGRP(*YES), it puts the program in the default activation group,
but it also changes the way it behaves -- it changes it to behave like
an OPM program. When you specify DFTACTGRP(*NO) it may still run in
the default activation group (via ACTGRP(*CALLER), that is) so it
doesn't really mean that it's not in the default activation group. But,
what it does mean is that it will act like an ILE program. (Which is
why you need DFTACTGRP(*NO) to use ILE features like procedures)
I wish they had named this parameter OPMCOMPAT() instead of DFTACTGRP(),
because of the confusion it causes.
But anyway, it's not a difference between interactive and batch, it's a
difference between DFTACTGRP(*YES and *NO). Plus, the fact that batch
jobs tend to run, and then end immediately, whereas interactive programs
tend to be started once, then re-used for many tasks...
As an Amazon Associate we earn from qualifying purchases.