3985 COMMIT must be the last statement in a request
Explanation:
The COMMIT WORK statement must be the last statement when more than one statement is in the request.
Generated By:
OPT modules
For Whom:
End User.
Remedy:
Reorder the statements in the request so that any COMMIT statement occurs last.