5 pts.
 questions related to commitment control in RPGLE
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

Software/Hardware used:
ASKED: July 15, 2010  4:18 PM
UPDATED: July 16, 2010  1:19 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 108,055 pts.

 

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

 44,150 pts.