Compensation in BTS

You can use compensation in business transaction services (BTS) to reverse or modify actions taken by preceding activities or to stop business transactions.

If a single CICS® transaction fails, any uncommitted changes that it has made to recoverable resources are automatically backed out by the CICS recovery manager. However, it is typically not practicable for a business transaction to be implemented as a single CICS transaction, due to the high rate of transaction abends and performance degradation that would result from holding locks for long periods.

Instead, using CICS business transaction services, each part of a business transaction is implemented as a separate BTS activity, consisting of one, or more CICS transactions. If an activity fails, the actions taken by preceding activities might need to be reversed, or possibly modified. Similarly, if application logic determines that the business transaction must be terminated, changes made by activities that have already completed might need to be reversed.

Modifying the actions of completed activities is called compensation.