Under DB2 z/OS the TP monitor (TSO, CICS, IMS, etc) is typically the coordinator of the two-phase commit process, which is why when the progarm ends a final commit is issued automatically.
You might try executing the program using an XA connection, which is two-phase commit process for DB2 LUW. I have worked with XA using Jboss, but not sure how that would work with a COBOL program. But that is the only thing I can think of.
Of course, adding a final commit to every program would not be that difficult.