A DO COMMIT statement sets commitment options for writing the variable value back to the Control-M/Analyzer Database and unlocks the variable – making it available to other rules. Various methods are available for specifying the type of commit that should occur. For information about DO COMMIT options and the DO SET statement, see Rule Definition.
Examples
When defining rules, the user should take into account various variable locking and unlocking methods. Examples of locking and committing strategies include:
Table 136 Committing Database Variables – Example 1
Do Statements |
Database Variable Status |
---|---|
DO SET = DB_TOTAL=DB_TOTAL |
Locked |
... |
Locked – while processing |
DO COMMIT ALL |
Unlocked – new value written |
Note: In the example above, if the DO COMMIT statement is omitted, the DB_TOTAL variable is automatically committed and unlocked during rule termination.
Table 137 Committing Database Variables – Example 2
Do Statements |
Database Variable Status |
---|---|
DO SET = DB_TOTAL=DB_TOTAL |
Locked |
... |
Locked – while processing |
DO COMMIT DELETE |
Unlocked – new value is not written |
Table 138 Committing Database Variables – Example 3
Do Statements |
Database Variable Status |
---|---|
DO SET = TEMP=DB_TOTAL |
Unlocked |
... |
Unlocked – while processing |
DO SET = DB_TOTAL=TEMP |
Locked |
DO COMMIT ALL |
Unlocked – new value is written |
Table 139 Committing Database Variables – Example 4
Do Statements |
Database Variable Status |
---|---|
DO SET = DB_TOTAL=DB_TOTAL |
Unlocked |
... |
Unlocked – while processing |
Parent Topic |