HCL Workload Automation, Version 9.4

Submitting jobs with affinity relationships

An affinity relationship is established between two or more jobs when you want them to run on the same resource.

Before you begin

An affinity relationship is useful when the results of one job are required for the next job to run. You can define an affinity relationship between two or more jobs in the following ways:

Submitting a job with affinity from the Dynamic Workload Console

About this task

To submit a job to run on the same resources as a previous job, do the following:

Procedure

  1. In the console navigation tree, expand Definitions and click Jobs.
  2. Search for a job definition stored in the Job Repository database.
  3. Select the job definition that you want to submit.
  4. Click Submit...
  5. Click Go. The Job Definitions wizard starts.
  6. You can optionally define an alias for the job by selecting Provide an alias to the job for this submission. Subsequently, you can use the alias name to submit a new job using the jobsubmit command to define an affinity relationship with the job you are submitting now. You can also use the alias as a user-friendly alternative to the job ID when performing queries on jobs from the command line or tracking job instances.
  7. In the Target Resource area, select the option Specify that this job runs on the same resources as a previous job.
  8. Click Next. If you selected to specify an alias, then you are prompted to provide the alias name. Click Next.
  9. Search and select the job with which you want to establish an affinity relationship. The current job will then run on the same resource as the job you select. Click Next.

  10. On the summary page, review your selections and click Finish to submit the job.

Results

The job is submitted on the same resources as the job you selected. You can now check the job status by selecting Tracking > Job Instances from the navigation. See Monitoring submitted jobs for more information.

Submitting a job with affinity from the command line

About this task

The jobsubmit command requires a job ID or an alias name for the affine job.

What to do next

Submit the following command to make the job defined in job definition WinJob2.jsdl, with the alias WJ220070606, run on the same resource as the previously run job, WinJob1, which was submitted with the alias, WJ120070606:
jobsubmit -jsdl WinJob2.jsdl -alias WJ220070606 -affinity alias=WJ120070606