Effect of begin transaction command

Table 5-9 shows the effect on processing when a begin transaction command occurs in a request.

Table 5-9: Effects of begin transaction command on processing

Condition/Status

When begin transaction occurs...

Does a rollback occur on an error?

A rollback does not occur.

What is the status of the connection after an error occurs?

The connection continues.

What happens if another begin transaction occurs?

The DB2 access service ignores the begin transaction command.

When the client application issues a commit or rollback, what happens?

If TransactionMode was originally short, it changes back to short. If TransactionMode was originally long, then a commit or rollback occurs.

If the request is a cursor or dynamic request, how does it behave?

The request continues behaving as a short setting.

In batch mode, what happens if an error occurs?

The batch continues.

When completed, is a batch job committed?

The batch does not commit.

After the batch commits, what is the status of the connection?

The connection continues.