← All errors

SQLCODE -7007

SQL7007 COMMIT, ROLLBACK or SAVEPOINT not valid

IBM message text
COMMIT, ROLLBACK, or SAVEPOINT not valid.
SQLCODE
-7007
SQLSTATE
51009

Most common cause

The program issues COMMIT, ROLLBACK or SAVEPOINT but commitment control is not active: for example it was compiled with COMMIT(*NONE).

Other causes

  • A SET OPTION COMMIT = *NONE in the source overriding the compile parameter.

How to fix it

Match the commit level to the use: if you need transactions use *CHG, *CS or *ALL (or SET TRANSACTION); otherwise remove COMMIT and ROLLBACK.

Related errors

Text and codes from IBM documentation for 7.6. Checked on .