HCL Workload Automation, Version 9.4

Automating production plan processing

If you want to extend your production plan at a fixed time interval, for example every week, you have the option to automate the extension. This section explains how you can do this.

With IBMIBM® Workload Scheduler version 9.1 and later, the Sfinal file has been modified to include two sample job streams named FINAL and FINALPOSTREPORTS that help you automate plan management. A copy of these job streams are found in the Sfinal file in the TWS_home directory. In addition, a copy of the job scripts is also located in this same location.

You can use either this Sfinal file or create and customize a new one.
Important: In any case, to be able to run these job streams successfully, the TWS_user must have Write access to the tmp default temporary directory.

The FINAL job stream runs the sequence of script files described in JnextPlan to generate the new production plan. See Creating and extending the production plan for reference.

The FINALPOSTREPORTS job stream, responsible for printing postproduction reports, follows the FINAL job stream and starts only when the last job listed in the FINAL job stream (SWITCHPLAN) has completed successfully. The FINALPOSTREPORTS job stream also includes a job named, CHECKSYNC, that monitors the progress and outcome of the planman resync command. The planman resync command loads the plan data from the Symphony file to the database.

With IBM Workload Scheduler version 9.1 and later, plan data is now fully replicated in the database. Each time the plan is extended, the plan in the database is recreated, making the latest information available to all users. If you are performing a fresh install of HCL Workload Automation, then this synchronization of the Symphony file with the database is enabled automatically when you add the Sfinal file to the database with the composer add Sfinal command. Since the Sfinal file is not overwritten during an upgrade, you must add the updated FINAL and FINALPOSTREPORTS job streams to the database by running the composesr add Sfinal command. This ensures that you have the CHECKSYNC job that is responsible for replicating plan data in the database. The updated Sfinal final can be found in TWA_home/config/ directory. You must then run JnextPlan to include the FINAL and FINALPOSTREPORTS job streams in the current production plan. See Customizing and submitting the optional final job stream

By default, the FINAL job stream is set to run once a day followed by the FINALPOSTREPORTS job stream. You can modify the time the job streams run by modifying two settings in the job stream definition. These are the details about the two steps you need to follow to do this, for example, to make the job streams run every three days:
  • Schedule the job stream to run every three days by modifying the run cycle inside the job stream definition.
  • In the statement that invokes MakePlan inside the FINAL job stream, set the production plan to last for three days by specifying -for 72.
Then you need to add the job streams to the database by performing the following steps:
  1. Log in as TWS_user.
  2. Run the tws_env script to set the HCL Workload Automation environment as follows:
    • UNIX: on C shells launch . .⁄TWS_home/tws_env.csh
    • UNIX: on Korn shells launch . .⁄TWS_home/tws_env.sh
    • From a Windows command line: launch TWS_home\tws_env.cmd

    where TWS_home represents the product installation directory.

  3. Add the FINAL and FINALPOSTREPORTS job stream definitions to the database by running the following command:
    composer add Sfinal
    If you did not use the Sfinal file provided with the product but you created a new one, use its name in place of Sfinal.
  4. Start the production cycle by running the JnextPlan script. In this way the FINAL and FINALPOSTREPORTS job streams will be included in the current production plan.
Note: Even if you decided to automate the production plan extension you can still run JnextPlan at any time.