Control-M/Analyzer database variables are commonly used concurrently by multiple rules or users. For this reason, the Control-M/Analyzer database has a locking capability. DO COMMIT parameters also affect the locking and unlocking of variables.
When considering locking, determine the answers to the following questions:
Is it possible for any individual rule to lock a database variable for long periods of time?
If so, will this cause a problem for other users and/or rules?
Can the rule that needs to lock a variable for long periods of time be scheduled after hours, or at a time that does not coincide with the other users and/or rules?
A discussion of locking database variables can be found in the Control-M/Analyzer User Guide. The user guide also includes a separate discussion of locking and unlocking database variables in relation to the DO COMMIT parameter. Among other topics regarding locking, the following is discussed in Control-M/Analyzer User Guide:
DO SET parameters that are used to specify database variables, should sometimes be located in a rule as close as possible to the corresponding DO COMMIT command. This may minimize the amount of time during which the database variable remains locked.
DO COMMIT NOW parameters should be used to unlock database variables immediately, rather than waiting until the end of the rule.
DO COMMIT DELETE parameters also unlock database variables so that they may be accessed by other rules. These parameters should be used as soon within in the rule when it will not be updating the database.
For example, in a balancing rule, there may be a long report being analyzed. As soon as he first intolerable error is found, the rule may be programmed not to update the Control-M/Analyzer database. If any variables are locked at that time, then a DO COMMIT DELETE will free them for use by other users and/or rules.
DO COMMIT NONE and DO COMMIT DELETE remove variables from the list of variables that will be updated. However, DO COMMIT NONE does not unlock the variables.
Any termination of the rule will result in any locked database variables being unlocked.