3

My iSeries ILE program crashed with uncommitted changes. Now I wish to end commitment control (to start program again, program starts commitment control itself) with ENDCMTCTL, but it fails with message:

CPF8355 - ENDCMTCTL not allowed. Pending changes active

Is there a way to rollback/commit changes and end commitment control proper way? My more experienced colleagues suggest only to sign out and start new session.

Edit

I have tried WRKCMTDFN and all actions in it with no success. Force rollback and Force commit failed with message:

CPD83ED -Commitment definition not eligible for forced rollback ... 
... 2 -- The logical unit of work, for this commitment definition, is not in
an undecided state.
Piro
  • 1,367
  • 2
  • 19
  • 40

2 Answers2

2

The message ID is probably CPF8355, and the second level text is helpful to understand the situation:

 Cause . . . . . :   An attempt was made to end commitment control for         
   commitment definition &1. However, there are one or more active resources   
   under commitment control for the commitment definition. The resources could 
   be one of the following:                                                    
     -- Local files                                                            
     -- Remote files                                                           
     -- API commitment resources                                               
     -- Remote SQL database                                                    

Use WRKJOB OPTION(*CMTCTL) to see which resources are still open and under commitment control. If there are open files, the program should close them before trying ENDCMTCTL. If this is a case where there are repeated CALLs to an RPG program which leaves files open for performance reasons, CALL it one last time with a special parameter which will tell it to close the files. Alternatively, if it's an ILE program, consider RCLACTGRP.

Buck Calabro
  • 7,558
  • 22
  • 25
  • RCLACTGRP works partially. I have to close IDE we use (TURNOVER) to reclaim activation group. After RCLACTGRP, state remains inconsistent and another invocation of program fails in system - `MCH3402 - Tried to refer to all or part of an object that no longer exists`. So like @Benny said ending job seems only valid option. – Piro Aug 02 '13 at 06:42
  • I thought Turnover was a change management system, but I don't use it. Are you calling your program from within Turnover? That might be adding to the confusion. Call your program from a command line and see if it'll work with a RCLACTGRP. – Buck Calabro Aug 02 '13 at 13:23
  • My mistake, not IDE! Same behavior when running from command line – Piro Aug 03 '13 at 08:14
  • OK so it seems there is also a service program in the reclaimed AG. Can you put the problem program in a separate, named activation group and then reclaim only that AG? – Buck Calabro Aug 04 '13 at 19:00
  • Separate activation group works well - no more problems after RCLACTGRP. Thank you for help. – Piro Aug 05 '13 at 05:24
1

After reading the documentation it appears there is not much else you can do. I would have expected you to be presented with an option to commit changes or roll them back based on this:

If there are uncommitted changes for an interactive job, a message is sent asking the user whether the changes should be committed or rolled back before a commitment definition is ended. For a batch job, the changes are rolled back.

Because you did not get this option I think your job has already begun the commit (or roll back) process and you cannot change it at this point. So you're left with the sole "option" of logging off - which will end your job and associated commitment control.

Benny Hill
  • 6,191
  • 4
  • 39
  • 59
  • Yes it looks like commit/rollback process already started, i have modified question with some details – Piro Aug 01 '13 at 07:46
  • @Piro - I think at this point all you can do is terminate your job (sign off the session, ENDJOB, whatever). It sounds like the commit/rollback has already happened but some resource hasn't closed yet - something like the scenario Buck describes with a file being left open in an RPG program where LR isn't turned on. – Benny Hill Aug 01 '13 at 13:39