× 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.



Thanx for the explanation. Especially the scope of the commit. That was something I haven't tested yet and was assuming that it would work that way. Nice to see that my assumptions were right.

The last sentence puzzles me a bit. My understanding so far is that I CAN start commitment control for/in different activation groups with the same or different lock levels and that I CANNOT start commitment control for the same activation group with same or different lock levels if it is already started. Is that right?

Regards

Mihael


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Birgitta Hauser
Sent: Friday, May 21, 2010 8:25 AM
To: 'RPG programming on the IBM i / System i'
Subject: AW: How to end commitment control with files open

Hi Mihael,

Commitment control is started specifically for that activation group.

you can't start commitment control for a specific activation group.
Starting commitment control with commitment scope *ACTGRP does only mean,
commit and rollback work only within the same activation group.
For example:
PGM1: Monitor;
Commit; (in PGM1 ActGrp1)
Insert...
Update...
Call PGM2 (ActGrp2)
PGM2: Monitor;
Insert...
Update...
On-Error;
Rollback; //Only rolls back the insert and update in
ActGrp2 (but NOT in ActGrp1)
EndMon;
Commit; //Only Commits the actions within ActGrp2
EndPgm2
On-Error;
Rollback; //Only rolls back the insert and update in ActGrp1 but
NOT in ActGrp2!!!
EndMon;
Commit; //Only commits the actions within ActGrp1
EndPGM1:

That's why some of your actions may not be committed.
I'd suggest, as long you are not working in an 150% ILE environment with
clearly designed activation groups with all commits and rollback on the
correct activation group level, start commitment control on job level. If
you start commitment control on job level, in the example above everything
is committed as soon as the commit in the second activation group is
executed (or all actions in ActGrp1 and ActGrp2 are rolled back as soon as
the rollback in PGM is executed.

If commitment control is started it cannot be started again (not even with a
different commitment scope)!

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Schmidt, Mihael
Gesendet: Friday, 21. May 2010 07:57
An: RPG programming on the IBM i / System i
Betreff: RE: How to end commitment control with files open

This is how I am doing it now:

Processing is done in a separate activation group. Commitment control is
started specifically for that activation group. This should not interfere
with any other commitment control started. I am not ending commitment
control after processing.

Is this the "normal" way of doing things?

Regards

Mihael

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mark S. Waterbury
Sent: Thursday, May 20, 2010 3:36 PM
To: RPG programming on the IBM i / System i
Subject: Re: How to end commitment control with files open

Hi, Mihael:

What are you trying to achieve?

Why do you want to end commitment control "in the middle" of a job?

What possible benefits do you think you might obtain from doing that?

Did you read the second-level message text for those messages (CPF1654
and CPF8355) you mentioned?

For RPG, you must change the F-spec to indicate that a file will be
under commitment control, and then recompile the program. You stated
that all of your programs "stay active" (with *INLR = *OFF). So, then,
if you were to "end commitment control" while the job was running, and
while these programs are active, and the files are open, what do you
suppose would happen?

Mark

On 5/20/2010 9:01 AM, Schmidt, Mihael wrote:
I tried ending the activation group...
<quote>
Then I tried reclaiming the activation group before ending commitment
control. But that results in the error message : CPF1654 Activation group
xxx cannot be deleted.
</quote>

... not ending commitment control: That is my last resort (because I don't
know any other way).

Thanx

Mihael


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Birgitta Hauser
Sent: Thursday, May 20, 2010 2:21 PM
To: 'RPG programming on the IBM i / System i'
Subject: AW: How to end commitment control with files open

Can you end the activation group before ending commitment control.
BTW I'd NEVER end commitment control within a job. If you set all commits
correctly you do not have to end commitment control (and restart it for
the
next call).
Commitment control will automatically ended as soon as the job ends. If
the
job ends normally a final commit is set if it ends abnormally a rollback
will be executed.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"


-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
Im
Auftrag von Schmidt, Mihael
Gesendet: Thursday, 20. May 2010 13:35
An: RPG programming on the IBM i / System i
Betreff: How to end commitment control with files open

Hi,

I got some programs which process some data. The controlling program is
running the default activation group and the processing ones are running
in
a named activation group. Processing is done under commitment control.

Now if I end commitment control from the controlling program with the
command ENDCMTCTL I get the error message : CPF8355 ENDCMTCTL not allowed.
Pending changes active.

Then I tried reclaiming the activation group before ending commitment
control. But that results in the error message : CPF1654 Activation group
xxx cannot be deleted.

If I look at the commit status on record level there are 3000 commits but
none pending.

What am I doing wrong?

The programs processing the data under CC all return with *INRL = *OFF for
performance reasons.

Thanx for any help in advance.

Regards

Mihael Schmidt
Anwendungsentwicklung

Dirk Rossmann GmbH
Iserhägener Str.16
30938 Burgwedel
* +49 (05139) 898 - 4353

Handelsregister-Nr. HRB 120546, Amtsgericht Hannover
Ust-Id-Nr. DE 115055186
St.-Nr. 16 / 205 / 65401
Geschäftsführer: Dirk Roßmann, Alice Schardt-Roßmann, Roland Frobel, Klaus
Praus




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-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.