Using variables in Workload Broker jobs

This section explains how to define and use variables in jobs for additional flexibility.

Dynamic workload broker supports the use of variables in jobs for additional flexibility. You can assign values to the variables or leave them blank, so that you can define the value when the job is submitted.

When you define jobs that will be processed through dynamic scheduling, you can include variables that can be used at run time to assign a value or override the variables defined in the JSDL job definition.

You define the variables in the Task String section of the IBM Workload Scheduler job, as described in the following example:
jobName -var var1Name=var1Value,…,varNName=varNValue
To define variables in the IBM Workload Scheduler job, perform the following steps:
  1. Create a JSDL job definition using the Job Brokering Definition Console.
  2. Define the variables for the job. For example, you can define the memory variable to specify the amount of memory required for the job to run.
  3. Move to the Resources tab, Hardware Requirements section and type the name of the variable in the Exact value field in the Physical Memory section. When the job is submitted, the value assigned to the memory variable defines the amount of physical memory.
  4. Save the job definition in the Job Repository database.
  5. Create a job to be submitted in IBM Workload Scheduler. This job contains the reference to the job in IBM® Workload Scheduler created in step 1. Define the IBM Workload Scheduler job as follows:
    1. In the Dynamic Workload Console, from the navigation bar, click Administration > Workload Design > Manage Workload Definitions.
    2. Select New > Job Definition > Cloud > Workload Broker.
    3. In the General tab, in the Workstation field specify the workload broker workstation.
    4. In the Task tab, in the Workload Broker job name field specify the name of the JSDL job definition you created in step 1.
  6. Add the IBM Workload Scheduler job to a job stream.
  7. Submit or schedule the IBM Workload Scheduler job using either the Dynamic Workload Console or conman.
  8. After any existing dependencies are resolved, the master domain manager submits the IBM Workload Scheduler job to IBM Workload Scheduler via the workload broker workstation.
  9. The workload broker workstation identifies the job definition to be submitted based on the information on the Task String section of the IBM Workload Scheduler job. It also creates an alias which contains the association with the job.
  10. The job definition is submitted to IBM Workload Scheduler with the value specified for the memory variable.
  11. Dynamic workload broker manages and monitors the whole job lifecycle.
  12. Dynamic workload broker returns status information on the job to the workload broker workstation, which communicates it to the Master Domain Manager. The job status is mapped to the IBM Workload Scheduler status.