questions related to commitment control in RPGLE

5 pts.
Tags:
AS/400
AS/400 commitment control
AS/400 jobs
STRCMTCTL
Hi everyone,  I have a strange question about commitment control as following: the program , say PGMA, have commitment control on two files. of coz the two files have been journaled. Another program, say PGMB, will call PGMA to update the two files. Before the call to PGMA, I use QCMDEXC to call the CL command "STRCMTCTL LCKLVL(*CHG) CMTSCOPE(*JOB)" to start commitment control and then call PGMA, and then call the CL command ENDCMTCTL. In addition, PGMA may be called by other PGMS in the same way as PGMB, with a call to STRCMTCTL and ENDCMTCTL. the issue comes: sometime in PGMB the call to STRCMTCTL fails and the job log says the commitment control is already active. The frequency is very low, since it appeared two times since its use 3 months ago. The parameter CMTSCOPE(*JOB) already defines the scope of current commitment control. Even if there's other jobs calling other PGMs or PGMB at the same time, they're different jobs and the commitment control of each job should be isolate. Is my thought correct? Anybody can give some instructions on this issue? Thanks in advance. xiaoymj

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    What is your OS version/release? What is your DB2 group PTF level? Some system functions have SQL at their core. For example, the CPYTOIMPF/CPYFRMIMPF commands run SQL internally and may create commitment definitions. If you are creating a commitment definition, your boundary possibly needs to be a little more limited in scope. PGMB should probably start its own activation group. And PGMA apparently should run in the *CALLER activation group. Then you might be able to STRCMTCTL CMTSCOPE( *ACTGRP ) and reduce the chance of conflict. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    At the job level, then it's not being affected by other jobs. Your job is either 1. Starting Commitment control, calling PGRMB, which calls PGM2, which starts commitment control (and sees an error) or 2. failing to endcmtctrl maybe because on an error and then is reaching a point where it attempts to start commitment control again. Phil
    51,235 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following