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.
The message ID is probably CPF8355, and the second level text is helpful to understand the situation:
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.