HCL Workload Automation, Version 9.4

< Previous

Customizing jobs and job streams based on where they are scheduled to run

This scenario shows how to customize jobs and job streams based on where they run, for example, on different workstations, using variable tables with workstations.

By having the ability to manage different variable tables, you no longer need to create two different job definitions to run the same workload (for example, a command whose syntax changes depending on the operating system) on different workstations. Instead, you define a single job that can be used on different workstations, defining a different variable table for each workstation and referencing it in the workstation definition. Each variable table contains the same variable with different values. You can than use that variable in the command that the job runs. Using variable tables you reduce the number of scheduling objects required to implement the desired workload saving therefore time and money.

You can find more information on this subject in the User's Guide and Reference.

Scenario goal

A company needs to run a clean-up application on the workstations in the sales department, once a week. These workstations have different HCL Workload Automation home directories and different HCL Workload Automation users. Using variable tables, you define a single job that runs the HCL Workload Automation rmstdlist clean-up application and a single job stream that includes this job. Your sales department includes multiple workstations which are all members of the same workstation class, so you define a different variable table for each workstation and reference it in the workstation definition. You define a job on the workstation class. This job must contain a variable for the path in the scriptname job attribute and a variable in the streamlogon job attribute.

Roles and skills

This section lists the users involved in the scenario, the related roles, and the required skill level:
HCL Workload Automation Job Scheduler
Manages Tivoli Workload Scheduler workload. Required skills include Tivoli Workload Scheduler knowledge.

System requirements

Install the following software before starting the scenario:
  • HCL Workload Automation version 8.5
  • Dynamic Workload Console version 8.5

Setting up the environment

Complete the following tasks before running the scenario:
  • Install and configure HCL Workload Automation version 8.5
  • Install and configure Dynamic Workload Console version 8.5

Running the Scenario

To complete the scenario, perform the following steps:

Procedure

  1. Define the SC2_PATH_TABLE1 and the SC2_PATH_TABLE2 variable tables as follows:
    VARTABLE SC2_PATH_TABLE1
      MEMBERS
      TWS_HOME "/home/MDM_85/TWS"
      TWS_USER "mdm_85"
    END
    
    VARTABLE SC2_PATH_TABLE2 
      MEMBERS
      TWS_HOME "/var/fta_85/TWS"
      TWS_USER "fta_85"
    END
    \
  2. Reference the SC2_PATH_TABLE1 and the SC2_PATH_TABLE2 variable tables on the workstations in your department. For example:
    • Reference the SC2_PATH_TABLE1 variable table on the SC2_TWS1 workstation using the following syntax:
      CPUNAME SC2_TWS1
        DESCRIPTION workstation of sales department
        VARTABLE SC2_PATH_TABLE1
        OS UNIX
        NODE iva.sales.com
        .... 
      END
    • Reference the SC2_PATH_TABLE2 variable table on the SC2_TWS2 workstation using the following syntax:
      CPUNAME SC2_TWS2
        DESCRIPTION workstation of sales department
        VARTABLE SC2_PATH_TABLE2
        OS UNIX
        NODE iva.sales.com
        .... 
      END
  3. Create the SC2_TWSWCLASS workstation class containing the SC2_TWS1 and the SC2_TWS2 workstations as members as follows:
    SC2_TWSWCLASS 
       MEMBERS 
       SC2_TWS1
       SC2_TWS2 
    END
  4. Create the SC2_JOB_CLEANUP job definition that runs the rmstdlist clean-up application using the following syntax:
    SC2_TWSWCLASS#SC2_JOB_CLEANUP
    DOCOMMAND "^TWS_HOME^/bin/rmstdlist" STREAMLOGON "TWS_USER"
  5. Include the SC2_JOB_CLEANUP job definition in the following job stream:
    SCHEDULE SC2_TWSWCLASS#SC2_JS_CLEANUP 
    ON SU
    :
    SC2_TWSCLASS#SC2_JOB_CLEANUP
    END

Expected results

When a plan is created on Sunday, one instance of the job stream for each of the workstations in the workstation class is included in the plan. The TWS_HOME and the TWS_USER variables are resolved differently according to the workstation on which the job is defined.

< Previous