This statement starts a lock sequence.
Scope of validity
DBH administration
See also
DBH administration statement END-LOCK-SEQUENCE on "END-LOCK-SEQUENCE"
DBH administration statement ABORT-LOCK-SEQUENCE on "ABORT-LOCK-SEQUENCE"
Function
The BEGIN-LOCK-SEQUENCE statement puts the administrator in a state in which all locks subsequently placed on database catalogs and spaces are maintained. This state continues until the lock sequence is terminated by one of the administration statements END-LOCK-SEQUENCE or ABORT-LOCK-SEQUENCE.
You must observe the following points:
The BEGIN-LOCK-SEQUENCE statement itself does not impose any locks.
Only administration statements are permitted in the lock sequence.
The ROLLBACK-TRANSACTION administration statement is not permitted in a lock sequence and leads to an error message. The RELEASE-USER-RESOURCES statement is ignored in a lock sequence. Another lock sequence can thus only be terminated with ABORT-LOCK-SEQUENCE.
The user must not have opened any other lock sequences in the DBH in which the statement was issued. For administration via the CALL DML interface, this applies to the DBH at which the command is issued.
The administration statement is rejected if the SESAM DBH was loaded without transaction management.
BEGIN-LOCK-SEQUENCE |
MODE = *WAIT / *FORCED |
Operands
MODE =
Specifies how the locks are applied in a lock sequence if they cannot be implemented immediately. This is the case when the object to be locked is still locked by another user.
MODE = *WAIT
There is a wait until the user responsible for locking the object unlocks it.
MODE = *FORCED
If possible, the user responsible for locking the object is rolled back.
This is not possible if the transaction to be rolled back is in the PTC status, is running in another lock sequence, or the lock sequence is locked by a utility statement. In this case, the current administration statement is rejected with an appropriate message.
Administration command in ISP format and at the CALL DML interface
The LSQ,BEGIN administration command corresponds to the BEGIN-LOCK-SEQUENCE administration statement here.
LSQ,B[EGIN],mode
mode ::= {W[AIT]|F[ORCED]}
The mode parameter must be specified.