SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-219
SET TRANSACTION Statement
isolation-level
specifies the level of data consistency defined for the transaction and the
degree of concurrency the transaction has with other transactions that use the
same data. The default isolation level of a transaction is determined according
to the rules specified in Isolation Level on page 10-45.
access-mode
specifies the type of data access that the transaction requires, depending on
whether changes are made to the database by the transaction.
If the isolation-level is READ UNCOMMITTED, you cannot specify
READ WRITE. The default access-mode is READ ONLY, and you can specify
only READ ONLY explicitly.
If the isolation-level is not READ UNCOMMITTED, you can specify
either READ WRITE or READ ONLY explicitly. The default access-mode is
READ WRITE.
See Transaction Access Modes on page 1-21.
diagnostics-size
specifies the size of the diagnostics area (as an estimate of the number of
expected conditions) used to return SQL query completion and exception
condition information.
number-of-conditions is an exact numeric literal with zero scale. If the
diagnostics-size is not set, it defaults to a system-defined value.
autocommit-option
specifies whether NonStop SQL/MX commits automatically or rolls back if an
error occurs at the end of statement execution. This option applies to any
statement for which the system initiates a transaction.
If this option is set to ON, NonStop SQL/MX automatically commits any
changes or rolls back any changes made to the database at the end of
statement execution. AUTOCOMMIT is ON by default at the start of an MXCI
session or for embedded SQL in Java programs.
If this option is set to OFF, the current transaction remains active until the end
of the MXCI session unless you explicitly COMMIT or ROLLBACK the
transaction. AUTOCOMMIT is OFF by default for embedded SQL in C or
COBOL programs.
If you exit a program without executing COMMIT or without setting
AUTOCOMMIT ON, any uncommitted changes are automatically rolled
back.
AUTOCOMMIT is an SQL/MX extension and cannot be used in combination
with any other option.
C/COBOL
Embed