|
... sounds like best way to use PROCP4NAME, so you could put the knowledge
about whiich trigger to call in an external configuration (database or
properties), evaluated at runtime and thsi could solve the issue with
"destroyed" ACTGRPs too.
Dieter
--------------------------------------------------
From: "Alan Campin" <alan0307d@xxxxxxxxx>
Sent: Thursday, October 07, 2010 12:36 AM
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Subject: Re: avoid running ILE programs in the DAG...
A bit more complicated.in
1. Trigger Mediator. Written in ILE RPG.
2. Service programs written in ILE RPG using SQL for I/O
Java program issues an SQL Insert or Update which runs in the QDASOINIT
job.
This fires the trigger mediator which knows which service program to call
for that table.
Updates are made to tables using SQL but nothing is commited. It returns
to
Java client which either issues a COMMIT or ROLLBACK. Again those
statements
run in the QDASOINIT job.
I have no choice about where IBM runs there statements. They always run
the QDASOINIT jobs and under the default activation group.group?
I just end up with problems if I try to run the trigger service programs
in
anything except the default activation group.
On Wed, Oct 6, 2010 at 4:12 PM, <dieter.bender@xxxxxxxxxxxx> wrote:
just to clearify:
- you have trigger programms written in ILE RPG
- you have RPG programms, using SQL registered as external stored
procedure
- this programms are using SRVPGMs
- you access DB2 from some Java Client under Commitment controll
and you don't want to run these programs in the default activation
the
D*B
--------------------------------------------------
From: "Alan Campin" <alan0307d@xxxxxxxxx>
Sent: Wednesday, October 06, 2010 9:27 PM
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Subject: Re: avoid running ILE programs in the DAG...
The commitment control is coming from a client job. I should have madeservice
that
clear. Client jobs run in a default activation group in a QDASOINIT
job.
Commitment control did not work for the client program to roll back
changes
in the trigger program unless it ran in the DAG group.
The error handling is another issue. If someone has a better way I
would
be
glad to hear it.
When you have an error in a trigger program, the only way that you
signal
back to the caller is by throwing an exception message. When you throw
back
an error and you are running in a named activation and that named
activation
is not being used higher up the stack is destroys the named activation
group
and the next time you try to call it you are not going to find the
program because the activation group is gone.named
You will have the same behavior if you have a program running in a
named
activation group and it calls a service program running in a another
activation group (Say QILE calling a service program running QSRVPGM).
If
both are running in QILE and the error occurs or you simply signal an
error
there is no problem but run them separate and boom.
As far as I am concerned this is bizarre behavior. If I am using the
activation group in the caller why is the activation group good and I
can
continue to use it but it is not any good when I running another
activation
group? Why destroy the activation group at all?
We also found this behavior happening when we had programs calling
COBOL
program that did a STOP UNIT(I think that is right). That destroyed
hateactivation group and we had problems with programmers doing RCLACTGRPand
(Vendor and ours) at the end of a program.
We spent hours and hours and hours talking to IBM about all this stuff
the only solution they could give us was to run in the DAG which I
justto
do.
All our programs are written 100% in modern RPG using ILE call models,
service programs and SQL.
If someone else has a better solution I would sure like to hear it.
On Wed, Oct 6, 2010 at 12:02 PM, Wintermute, Sharon <
Sharon.Wintermute@xxxxxxx> wrote:
I wonder if the OP is using CLP instead of CLLE routines to start
commitment control. The CLLE should use the same named AG as the rpg
routine.
Sharon Wintermute
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark Murphy/STAR
BASE Consulting Inc.
Sent: Wednesday, October 06, 2010 12:55 PM
To: RPG programming on the IBM i / System i
Subject: RE: avoid running ILE programs in the DAG...
Yes it works on named activation groups. The commit scope can be the
activation group it was started in (this is the default), or the job.
If Alan was using mixed activation groups (some programs OPM, some
programs ILE with named activation group), he might think that
commitment control was not working, but in actuality it was doing
youwhat he told it to do. To cover the entire job in such a mixed
environment you need to use STRCMTCTL CMTSCOPE(*JOB).
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----rpg400-l-bounces@xxxxxxxxxxxx wrote: -----
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx
From: "Wintermute, Sharon" <Sharon.Wintermute@xxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
Date: 10/06/2010 01:39PM
Subject: RE: avoid running ILE programs in the DAG...
I use commitment control within named AGs all the time. It does work.
Sharon Wintermute
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryce Martin
Sent: Wednesday, October 06, 2010 12:31 PM
To: RPG programming on the IBM i / System i
Subject: Re: avoid running ILE programs in the DAG...
Why not have a cleanup program for each service program so that if it
ends
in error you won't have any junk laying around. What exactly were
CC,pointing to that you got a pointer crash? I write all my new code in
named AG's, and trust me, when I'm developing they crash and burn.
But
I
don't ever have trouble running the program again. Are you trying to
trap
the error and continue? Or are you describing just rerunning the
program?
I'm guessing you are missing a critical piece. You should no way no
how
need to run your service programs in the DAG.
Can anyone else verify if commitment control will or won't work in
named
AG's? I can't hardly believe that. I know most i shops don't use
Whybut
this would seem like a huge oversight on IBM's part.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Alan Campin <alan0307d@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/06/2010 12:35 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: avoid running ILE programs in the DAG...
We had to put our service programs back into DAG because commitment
control
would not work unless the program was running DAG.
We also ran into big problems with errors in named activation groups.
Every
time that an error is thrown in a named activation group the system
destroys
the activation group and when you try to go back to it the program
crashes
because the pointer is now pointing at a object that doesn't exist
anymore.
The only way we could seem to get around this was to run the service
program
and programs in the DAG so that it could not destroy the activation
group.
Totally bizarre behavior on IBM's part. Errors occur all the time.
Activationdestroy the activation group but that what they do.
I don't like running everything in the DAG but pretty much have no
choice.
On Wed, Oct 6, 2010 at 8:12 AM, Stefano Arrighini - Smea s.r.l. <
s.arrighini@xxxxxxx> wrote:
Hi to allprograms
Some years ago all ours programs ran in the DAG.
In the past two years we "introduced" Activation Group in some
(some in named AG, other in temporary ones).performance,
We made this for various reason (avoid recursion, improve
etc.).
Unfortunately (or better... by ignorance...) we made this
operation
without having well understood Activation Groups.
Now I'm trying to do spring cleaning...
In all (or almost) technical articles and forum I read, I found
the
advice
to avoid running ILE programs in the DAG.
So we modified our programs to run all of them in Named
aGroup
(or Temporary) and not in the DAG.ours
None of our programs are compilated with DFTACTGRP(*YES)!!
So I simply replaced *CALLER with Named-one in the ACTGRP option
of
"starting program" (the first program in the call stack of oursjob).
problem
I found lots of advantages... but this operation introduced some
with OVRDBF scoping.with
To avoid this problem I changed the OVRDBF (and OVRPRTF and
DLTOVR)
scoping problem.in
A make an OVRPRTF and calls B
B calls C
C is in a different AG and isn't affected by OVRPRTF. But I want
it.
OVRPRTF OVRSCOPE(*CALLLVL) was my solution..
Now my MAIN question is...
Compiling all my existing program in a proper Activation Group
(not
the
DAG), how many other problem can produce?
For example I found some difference in "free resources".
The RCLRSC LVL(*CALLER) used in the DAG can't be "replaced" with
mailingsimilar
command in a Named AG...
I have to close the Activation Group... Right?
Any help or observation would be greatly appreciated.
Thanks in advance
Stefano
--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L)
confidential,list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--- This message (including any attachments) is intended only for the
use of the individual or entity to which it is addressed and may
contain
information that is non-public, proprietary, privileged,
prohibited.and exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any use,
dissemination,
distribution, or copying of this communication is strictly
andIf you have received this communication in error, please notify us
mailingdestroy this message immediately. ---
--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailinglist
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailinglist
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailinglist
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L)
------list--
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.