Each job run by Control‑M has a unique five-character alphanumeric order ID. This order ID is displayed (as OrderID=xxxxx) in the Control‑M Active Environment screen (Screen 3) when command ORDERID is entered on the command line.
Perform the following steps to implement the automatic Rollback facility for jobs restarted by Control‑M/Restart:
You can do this by passing AutoEdit variable %%ORDERID as an argument in the EXEC statement that invokes Control‑M/Analyzer. The EXEC statement syntax is
// EXEC CONTROLB,RULE=MYRULE,ARG=%%ORDERID |
For example, if 014OX is the order ID of the Control‑M job that invokes Control‑M/Analyzer, the EXEC statement that invokes Control‑M/Analyzer resolves to
// EXEC CONTROLB,RULE=MYRULE,ARG=014OX |
When the order ID value is passed to Control‑M/Analyzer, the rule must execute the following statement:
DO REMARK DATA 'OID=%%RARGnn' |
where %%RARGnn refers to the nth argument passed to the rule.
For example, use %%RARG01 if %%ORDERID is the first argument. After statement DO REMARK is executed, the activity record for this Control‑M/Analyzer execution contains the value: OID=014OX. This value can be displayed in the REMARK field of the Control‑M/Analyzer Rule Activity screen (Screen BA).
This requirement is automatically satisfied when Control‑M/Restart calls User Exit CTRX001Q with the current order ID. This user exit passes the order ID to the Rollback facility. The Rollback facility rolls back database records created during execution of the job whose activity record contains this order ID.
Parent Topic |