Creating and activating the new current plan

The creation of a new current plan is performed by the daily planning batch jobs. The two possible options are extend and replan the current plan. You also use the extend function when creating a current plan for the first time. Both the extend and replan functions cause the creation of a new current plan in the new current-plan (NCP) data set.

The steps below describe in detail how the new current plan is created and then brought into normal processing:

A Daily Planning job starts and is recognized by HCL Workload Automation for Z.

  1. A daily planning batch job starts, signals the HCL Workload Automation for Z subsystem using an ENQ, and then waits.

    The active Current Plan is backed up

  2. HCL Workload Automation for Z detects the ENQ from the batch job and locks the current plan, thereby preventing more updates. All events related to job streams and jobs in HCL Workload Automation are queued for later processing.
  3. The active current plan is updated with the latest information from in-storage control blocks representing workstations and active operations. The extension file (CX), which is held in a data space, is refreshed to DASD.
  4. The inactive current plan is erased.
  5. The active current plan is copied to the inactive current plan. They are now identical.
  6. The inactive current plan becomes the active current plan, and the previously active becomes the inactive.
  7. The job-tracking logs are switched.
  8. The current plan is unlocked, and normal processing continues. The current plan is updated, processing the queued events: these updates are logged into the currently active job-tracking log.
  9. The data from the inactive job-tracking log is appended to the job-tracking archive log.
  10. HCL Workload Automation for Z signals to the batch job that backup processing is complete.
  11. No more events for HCL Workload Automation are processed. These events are processed later in the new plan using the usual processing for HCL Workload Automation.

    The daily planning job builds a NCP

  12. The batch job starts executing again. The inactive current plan is used (together with the long-term plan, application description, resource database, and workstation for a current plan extend) as input, and a new current plan is created in the NCP and new current plan extension (NCX) data sets. While the batch job is building the new current plan, HCL Workload Automation for Z continues normal processing except that a current plan backup is not permitted because the batch job is using the inactive current plan data set.
  13. The contents of the job-tracking archive data set are copied to the data set in the daily planning job referenced by the EQQTROUT ddname.
  14. When the new current plan is ready, the checkpoint data set is updated to show if the new current plan was successfully created. The normal mode manager (NMM) subtask is notified that the daily planning process has completed.
  15. The current plan is locked, preventing it from being updated. All events related to job streams and jobs for HCL Workload Automation are queued for later processing.
  16. The new current plan is copied to the active current plan, and the NCX is copied to the current plan extension (CX).
  17. The job-tracking archive log is emptied.
  18. The active job-tracking log now contains a record of the updates to the current plan that were made while the daily plan job was running. These are read, and the current plan is updated accordingly.
  19. In-storage control blocks representing workstations and active operations are rebuilt from the active current plan, and a data space is created from the current-plan-extension data set.

    The newly created active Current Plan is backed up

  20. A current plan backup is performed. The inactive current plan is erased.
  21. The active current plan is copied to the inactive .
  22. The next available job-tracking log becomes active.
  23. The current plan is unlocked and normal processing continues.
  24. The data from the now inactive job-tracking log is copied into the job-tracking archive log.
Note:
  1. Consider that all long-term plan and current plan batch planning jobs have to be excluded from SMARTBATCH DA (Data Accelerator) processing. When the SMARTBATCH DATA ACCELERATOR is used with the long-term plan and current plan batch planning jobs, the normal I/O to EQQCKPT is delayed until END OF JOB (or at least END OF JOBSTEP). This interferes with the normal exchange of data between the batch job and the controller started task so that when the batch job signals the controller to check the EQQCKPT to determine whether a new current plan has been created, the required updates to the CKPT have not yet been made. This causes the controller to conclude that no NCP has been created, and no turnover processing is done. As a result, even if the plan jobs run successfully, the NCP is not taken into production by the controller unless a CURRPLAN(NEW) restart is performed.
  2. Batch optimizer utilities, such as BMC Batch Optimizer Data Optimizer and Mainview Batch Optimizer, prevent correct communication between the scheduler's controller and CP/LTP batch planning jobs. The scheduler's logic depends on an exchange of enqueues and real-time updates of several sequential data sets to pass information back and forth between the controller's STC and the CP/LTP batch planning jobs. These optimizers hold I/O from the batch jobs until END OF STEP or END OF JOB, then preventing the required communication from taking place. When such utilities are allowed to "manage" I/O for the scheduler's CP or LTP batch planning jobs, communication between the jobs and the controller is disrupted. This causes numerous problems that are hard to diagnose. Most commonly, the CURRENT PLAN EXTEND or REPLAN jobs will run to normal completion, and an NCP data set will be successfully created, but the controller will fail to automatically take the new plan into production until it is forced to do so via a CURRPLAN(NEW) restart of the CONTROLLER. Use of BATCHPIPES with these batch planning jobs will result in the same sorts of problems.