Previous Topic

Next Topic

Book Contents

Book Index

Triggering Rollback using Procedure CONTROLR

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:

  1. Pass the Control‑M order ID to the Control‑M/Analyzer rule that generates the variables that are stored in the Control‑M/Analyzer database.

    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

  2. In the Control‑M/Analyzer rule, define a DO REMARK statement that inserts the order ID value in the Control‑M/Analyzer activity record.

    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).

  3. The Control‑M/Analyzer activity record automatically identifies the generation of database variables that was created by the job that is being restarted by Control‑M/Restart.
  4. Call User Exit CTRX001Q with the order ID of the job that created the variables that must be rolled back.

    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

Control-M/Restart Support for the Control-M/Analyzer Rollback Facility