Previous Topic: Step 3: Review and Modify Your STCTBL_ACT TableNext Topic: Sample Code


Step 4: Auto-Enable Rules That Monitor Started Tasks

You enable and auto-enable the rules packets that update the current state for each started task in the STCTBL table. Many of these rules packets are prewritten. You can find these packets in the OPS.CCLXRULM data set. Each rules packet contains subsystem-specific rules that correspond to the data in the TYPE column of your started task table. The names of these rules packets have the format SSMxxxx, where xxxx is the subsystem name.

Note: For instructions on how to enable and auto-enable rules packets, see Lesson 5: How to Enable and Disable Rules and Rule Sets in the chapter “How to Begin Using the Product.”

Some rules packets are composed of multiple rule members. Rules packets use the SQL update instructions to update the STCTBL with the appropriate status.

Follow these steps:

  1. If you did not use the recommended name of STCTBL, you must change this table name.
  2. Create rules for started tasks for which we supply no prewritten rules.
  3. Use an existing rules packet as a model, and change the MSGID text to the IDs of messages representing the UP and DOWN states for that task.

    Besides updating the CURRENT_STATE column values to UP or DOWN, rules packets track the starting and stopping of the resources and so prevent duplicate tasks from being started.

    You do not need to track starting and stopping, but tracking is useful because it lets you see how far the task has progressed in trying to reach its desired state.

  4. Besides enabling the rules packets that monitor the CURRENT_STATE for each started task, you must also enable the following rules members:

    These members include the command trapping rules that are needed to intercept manually entered S or P commands.

    The following sample OPS/REXX programs are provided in the OPS.CCLXRULM data set:

This step is complete when the required rule members and rules packets for each started task are auto-enabled.