A SUBTRANS BEGIN statement must have been called for each subtransaction that is to be closed.
Check the database application for the dynamic behavior of the SUBTRANS statements.