ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Getting a MCH6206 Return Code 4 error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting a MCH6206 Return Code 4 error

    I got a MCH6206 "Commitment control resource limit overflowed. Return code is X'04'." in one of my batch jobs today.
    The batch program opens 2 files in commitment control. File1 is opened for update under commit and File2 is opened for addition under commit.
    The flow of the program is:
    ------------------------------------------------------------------
    Read unprocessed record in File1 with a setll and reade.
    Add record to File2
    Update File1 record to processed
    Commit
    Read next unprocessed record in File1 with a reade.
    Set InLR = *On
    Return
    ------------------------------------------------------------------
    According to the below IBM page this happens only when "In this case, an RPG program was using commit control without issuing the commit before 'return'ing.
    In order to avoid leaving the open position in the commit block, the RPG program would need to use SETONLR instead of RETURN. An alternative would be to issue COMMIT prior to the RETURN."
    I'm doing both of these in the program.
    https://www.ibm.com/support/pages/wh...-4-really-mean

    This same program is called from several batch jobs on the same system for different clients all running under the same activation group.
    All these batch jobs work on the same File1 and File2 in a common library.
    Could this be the cause of the issue?
    These jobs have already been running for almost 2 months now without issues.
Working...
X